diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index 4d3942f9d5..9ca35327dd 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -339,7 +339,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); @@ -442,7 +442,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}>( @@ -473,7 +473,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}>( @@ -501,7 +501,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"")); /// @@ -527,7 +527,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); @@ -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); @@ -972,7 +972,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) {{ @@ -987,14 +987,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1003,21 +1003,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 066543d2de..9347a1d809 100644 --- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs @@ -1,4 +1,4 @@ -using CodeGen.Helpers; +using CodeGen.Helpers; using CodeGen.JsonTypes; namespace CodeGen.Generators.UnitsNetGen @@ -89,7 +89,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 2561a73651..64aceb8c17 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; }} }} @@ -491,10 +491,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() }} [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() {{ var quantity = {_quantity.Name}.From{_baseUnit.PluralName}(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, ""g""), quantity.ToString(null, ""g"")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, ""g""), quantity.ToString(null, ""g"")); }} #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/CustomCode/StonePoundsTests.cs b/UnitsNet.Tests/CustomCode/StonePoundsTests.cs index b8cafbb920..e04d1310d0 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 e8d6b5a450..82c4e8694e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs @@ -457,8 +457,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()); @@ -476,7 +476,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -504,10 +504,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")); @@ -515,7 +515,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -546,10 +546,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Acceleration.FromMetersPerSecondSquared(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs index a98c19d80d..4b0502f8c1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs @@ -483,8 +483,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()); @@ -504,7 +504,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -534,10 +534,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")); @@ -545,7 +545,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -576,10 +576,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = AmountOfSubstance.FromMoles(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs index 708b250965..9da303f952 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.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 dBµV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelMicrovolt).ToString()); Assert.Equal("1 dBmV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelMillivolt).ToString()); @@ -354,7 +354,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -373,10 +373,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")); @@ -384,7 +384,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -415,10 +415,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = AmplitudeRatio.FromDecibelVolts(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs index 0febe024a9..d50f883052 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs @@ -470,8 +470,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()); @@ -490,7 +490,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -519,10 +519,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")); @@ -530,7 +530,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -561,10 +561,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Angle.FromDegrees(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs index 4fa051c4f5..d41f725ebd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ApparentEnergy.FromVoltampereHours(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs index a26aece968..4e1a070d52 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs @@ -340,8 +340,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()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ApparentPower.FromVoltamperes(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs index dddc3a8f76..3fc3afe5ab 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = AreaDensity.FromKilogramsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs index 2249a49b0a..abe560b4bd 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs @@ -366,8 +366,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()); @@ -378,7 +378,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -399,10 +399,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")); @@ -410,7 +410,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -441,10 +441,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = AreaMomentOfInertia.FromMetersToTheFourth(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs index 8c75c47491..cab90efb4a 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs @@ -470,8 +470,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()); @@ -490,7 +490,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -519,10 +519,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")); @@ -530,7 +530,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -561,10 +561,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Area.FromSquareMeters(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs index 412db29a2d..f9ba44a325 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs @@ -594,8 +594,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()); @@ -626,7 +626,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -667,10 +667,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")); @@ -678,7 +678,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -709,10 +709,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = BitRate.FromBitsPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs index c23cdb9618..73f38a66b7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs index 9d80acb031..045f8040c5 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs @@ -379,8 +379,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()); @@ -392,7 +392,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -414,10 +414,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")); @@ -425,7 +425,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -456,10 +456,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Capacitance.FromFarads(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs index ca39d1c031..ee789598a3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = CoefficientOfThermalExpansion.FromInverseKelvin(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs index 0e541d999b..47b556d610 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs @@ -808,8 +808,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()); @@ -854,7 +854,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -909,10 +909,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")); @@ -920,7 +920,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -951,10 +951,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Density.FromKilogramsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs index ec6cd5b9df..8cda40dae7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs @@ -418,8 +418,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()); @@ -434,7 +434,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -459,10 +459,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")); @@ -470,7 +470,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -501,10 +501,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Duration.FromSeconds(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs index c5759f89e7..2e4f9fbd82 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs @@ -405,8 +405,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()); @@ -420,7 +420,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -444,10 +444,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")); @@ -455,7 +455,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -486,10 +486,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = DynamicViscosity.FromNewtonSecondsPerMeterSquared(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs index 2b0a035135..d18535629d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs @@ -340,8 +340,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()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricAdmittance.FromSiemens(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs index 0b0a1a8b91..97c7aa7bd7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricChargeDensity.FromCoulombsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs index 6758d3fcea..19687674ad 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs @@ -353,8 +353,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()); @@ -364,7 +364,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -384,10 +384,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")); @@ -395,7 +395,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,10 +426,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricCharge.FromCoulombs(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs index 910069f4c3..5c24e7be7e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricConductance.FromSiemens(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs index ecfc40aa40..480bf91dd1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricConductivity.FromSiemensPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs index fe9de9d9ea..c8e3ee868e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricCurrentDensity.FromAmperesPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs index 95314e1e5e..529a8e3364 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs @@ -301,14 +301,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/s", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerSecond).ToString()); } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricCurrentGradient.FromAmperesPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs index 317bf286b1..3d63dd1615 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs @@ -392,8 +392,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()); @@ -406,7 +406,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -429,10 +429,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")); @@ -440,7 +440,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -471,10 +471,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricCurrent.FromAmperes(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs index 6c1a712012..377e80f445 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricField.FromVoltsPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs index 12c90919fc..03fdbab3ff 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs @@ -340,8 +340,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()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricInductance.FromHenries(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs index ca27c93970..41f0e1c17d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs @@ -353,8 +353,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()); @@ -364,7 +364,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -384,10 +384,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")); @@ -395,7 +395,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,10 +426,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricPotentialAc.FromVoltsAc(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs index 9bea7822d6..d871d9ab0b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs @@ -548,8 +548,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()); @@ -574,7 +574,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -609,10 +609,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")); @@ -620,7 +620,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -651,10 +651,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricPotentialChangeRate.FromVoltsPerSeconds(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs index ef1b6a2d63..33c79f0ba7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs @@ -353,8 +353,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()); @@ -364,7 +364,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -384,10 +384,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")); @@ -395,7 +395,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,10 +426,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricPotentialDc.FromVoltsDc(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs index c984d21229..14076bdbf9 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs @@ -353,8 +353,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()); @@ -364,7 +364,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -384,10 +384,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")); @@ -395,7 +395,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,10 +426,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricPotential.FromVolts(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs index c2d742f03b..70ce6e796c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs @@ -353,8 +353,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()); @@ -364,7 +364,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -384,10 +384,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")); @@ -395,7 +395,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,10 +426,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricResistance.FromOhms(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs index 88ff7e8500..4aa0ef9e15 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs @@ -470,8 +470,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()); @@ -490,7 +490,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -519,10 +519,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")); @@ -530,7 +530,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -561,10 +561,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricResistivity.FromOhmMeters(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs index c7a52e7880..aa7c592310 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ElectricSurfaceChargeDensity.FromCoulombsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs index ef7d485326..d2138a7c7b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs @@ -743,8 +743,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()); @@ -784,7 +784,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -834,10 +834,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")); @@ -845,7 +845,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -876,10 +876,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Energy.FromJoules(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs index dd87f6ab7a..ec5ba09fa8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs @@ -379,8 +379,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()); @@ -392,7 +392,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -414,10 +414,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")); @@ -425,7 +425,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -456,10 +456,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Entropy.FromJoulesPerKelvin(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs index 548df4c745..6a38624ba0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs @@ -431,8 +431,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()); @@ -448,7 +448,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -474,10 +474,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")); @@ -485,7 +485,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -516,10 +516,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ForceChangeRate.FromNewtonsPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs index 51626b8468..6e3d570391 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs @@ -782,8 +782,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()); @@ -826,7 +826,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -879,10 +879,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")); @@ -890,7 +890,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -921,10 +921,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ForcePerLength.FromNewtonsPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs index 40c75ab427..8f630f8eec 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs @@ -470,8 +470,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()); @@ -490,7 +490,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -519,10 +519,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")); @@ -530,7 +530,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -561,10 +561,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Force.FromNewtons(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs index a73055bce6..e38b93c545 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs @@ -418,8 +418,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 cph", new Frequency(1, FrequencyUnit.CyclePerHour).ToString()); @@ -434,7 +434,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -459,10 +459,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")); @@ -470,7 +470,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -501,10 +501,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Frequency.FromHertz(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs index 1e7d191669..fbb578c144 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs @@ -340,8 +340,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()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = FuelEfficiency.FromLitersPer100Kilometers(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs index 3fbffc36a7..d65217b8e4 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs @@ -522,8 +522,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()); @@ -546,7 +546,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -579,10 +579,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")); @@ -590,7 +590,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -621,10 +621,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = HeatFlux.FromWattsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs index da082abe14..23a19d17d7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = HeatTransferCoefficient.FromWattsPerSquareMeterKelvin(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs index 9476f78b1e..cece526a2d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs @@ -340,8 +340,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()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Illuminance.FromLux(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs index 1e63906500..6347f9b8da 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs @@ -594,8 +594,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()); @@ -626,7 +626,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -667,10 +667,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")); @@ -678,7 +678,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -709,10 +709,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Information.FromBits(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs index 2761d2f34b..ae20f6d195 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs @@ -470,8 +470,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()); @@ -490,7 +490,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -519,10 +519,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")); @@ -530,7 +530,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -561,10 +561,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Irradiance.FromWattsPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs index 212a5f8ec2..8de73dae96 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs @@ -379,8 +379,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()); @@ -392,7 +392,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -414,10 +414,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")); @@ -425,7 +425,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -456,10 +456,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Irradiation.FromJoulesPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs index b3ec7fef99..895ce5f743 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs @@ -392,8 +392,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()); @@ -406,7 +406,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -429,10 +429,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")); @@ -440,7 +440,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -471,10 +471,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = KinematicViscosity.FromSquareMetersPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs index fd006236d2..d69813e3f6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = LapseRate.FromDegreesCelciusPerKilometer(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs index 695b44d3f9..6bcdf2060f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs @@ -717,8 +717,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()); @@ -756,7 +756,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -804,10 +804,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")); @@ -815,7 +815,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -846,10 +846,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Length.FromMeters(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs index 8bd8f79de0..ed1c93766b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs @@ -318,15 +318,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; } } @@ -343,10 +343,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")); @@ -354,7 +354,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -385,10 +385,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Level.FromDecibels(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs index 01a64a5151..1d7fb398ab 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs @@ -470,8 +470,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()); @@ -490,7 +490,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -519,10 +519,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")); @@ -530,7 +530,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -561,10 +561,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = LinearDensity.FromKilogramsPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs index d13e557ff5..a22a6f51a7 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs @@ -613,8 +613,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()); @@ -644,7 +644,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -684,10 +684,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")); @@ -695,7 +695,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -726,10 +726,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = LinearPowerDensity.FromWattsPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs index 4c6bbef389..1d92528f39 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs @@ -470,8 +470,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()); @@ -490,7 +490,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -519,10 +519,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")); @@ -530,7 +530,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -561,10 +561,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Luminosity.FromWatts(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs index 8e5c85740d..e39a63c19c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = LuminousFlux.FromLumens(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs index d1d9a354b5..d499720164 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = LuminousIntensity.FromCandela(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs index 334fb7b3ad..7668ee28f2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs @@ -340,8 +340,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 µT", new MagneticField(1, MagneticFieldUnit.Microtesla).ToString()); Assert.Equal("1 mT", new MagneticField(1, MagneticFieldUnit.Millitesla).ToString()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MagneticField.FromTeslas(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs index 461fedc57d..a1ef4e4849 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MagneticFlux.FromWebers(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs index 95f91dccf6..9abd8c3374 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Magnetization.FromAmperesPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs index 2d87cf25c6..c44cf24ccb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs @@ -808,8 +808,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()); @@ -854,7 +854,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -909,10 +909,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")); @@ -920,7 +920,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -951,10 +951,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MassConcentration.FromKilogramsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs index 5e4f903ecc..2b91d19224 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs @@ -717,8 +717,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()); @@ -756,7 +756,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -804,10 +804,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")); @@ -815,7 +815,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -846,10 +846,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MassFlow.FromGramsPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs index 98c2f6c2c8..4596e1ccf8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs @@ -444,8 +444,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()); @@ -462,7 +462,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -489,10 +489,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")); @@ -500,7 +500,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -531,10 +531,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MassFlux.FromKilogramsPerSecondPerSquareMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs index 3d38e4fec8..7dd6732e2d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs @@ -600,8 +600,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()); @@ -630,7 +630,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -669,10 +669,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")); @@ -680,7 +680,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -711,10 +711,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MassFraction.FromDecimalFractions(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs index 2b8a75b0c7..2ce7c743b2 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs @@ -652,8 +652,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()); @@ -686,7 +686,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -729,10 +729,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")); @@ -740,7 +740,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -771,10 +771,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MassMomentOfInertia.FromKilogramSquareMeters(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs index 445defe68f..e154599da0 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs @@ -613,8 +613,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()); @@ -644,7 +644,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -684,10 +684,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")); @@ -695,7 +695,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -726,10 +726,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Mass.FromKilograms(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs index 3950ef38e4..d6ebcaa3bf 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MolarEnergy.FromJoulesPerMole(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs index 61f6d59220..3004d1ff5d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MolarEntropy.FromJoulesPerMoleKelvin(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs index 64eaf2504e..bd993e4120 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs @@ -444,8 +444,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()); @@ -462,7 +462,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -489,10 +489,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")); @@ -500,7 +500,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -531,10 +531,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = MolarMass.FromKilogramsPerMole(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs index 5379595111..3c362a75eb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs @@ -392,8 +392,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()); @@ -406,7 +406,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -429,10 +429,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")); @@ -440,7 +440,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -471,10 +471,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Molarity.FromMolesPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs index fe2da572fb..77ce6de3c6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Permeability.FromHenriesPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs index ca601bf52a..f5c1207ad6 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Permittivity.FromFaradsPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs index e3ec3d1386..ba1689308c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs @@ -860,8 +860,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()); @@ -910,7 +910,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -969,10 +969,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")); @@ -980,7 +980,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -1011,10 +1011,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = PowerDensity.FromWattsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs index 6e396fa839..42b66f334f 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs @@ -318,15 +318,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; } } @@ -343,10 +343,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")); @@ -354,7 +354,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -385,10 +385,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = PowerRatio.FromDecibelWatts(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs index 50cd2cb275..08ea86f7bc 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs @@ -581,8 +581,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()); @@ -612,7 +612,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -652,10 +652,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")); @@ -663,7 +663,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -694,10 +694,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Power.FromWatts(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs index f0a131094a..0724c84320 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs @@ -379,8 +379,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()); @@ -392,7 +392,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -414,10 +414,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")); @@ -425,7 +425,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -456,10 +456,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = PressureChangeRate.FromPascalsPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs index 8651214baa..4d5bd01aed 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs @@ -834,8 +834,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()); @@ -882,7 +882,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -939,10 +939,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")); @@ -950,7 +950,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -981,10 +981,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Pressure.FromPascals(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs index 634226dd3b..75b43e6f8b 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs @@ -314,15 +314,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; } } @@ -339,10 +339,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")); @@ -350,7 +350,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -381,10 +381,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = RatioChangeRate.FromDecimalFractionsPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs index 3eae28326a..ade32bb840 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs @@ -366,8 +366,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()); @@ -378,7 +378,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -399,10 +399,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")); @@ -410,7 +410,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -441,10 +441,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Ratio.FromDecimalFractions(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs index 9eb8376660..ca4cda2006 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ReactiveEnergy.FromVoltampereReactiveHours(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs index 43ad08f7e5..ee69371dd3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs @@ -340,8 +340,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()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ReactivePower.FromVoltamperesReactive(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs index d253c9abcf..b1b6c3ce4c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs @@ -340,8 +340,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()); @@ -350,7 +350,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -369,10 +369,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")); @@ -380,7 +380,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -411,10 +411,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = RotationalAcceleration.FromRadiansPerSecondSquared(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs index 3c299b7771..ac40f37e9d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs @@ -457,8 +457,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()); @@ -476,7 +476,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -504,10 +504,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")); @@ -515,7 +515,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -546,10 +546,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = RotationalSpeed.FromRadiansPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs index 051f000328..53f9014674 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs @@ -353,8 +353,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()); @@ -364,7 +364,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -384,10 +384,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")); @@ -395,7 +395,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,10 +426,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs index 99df23a76b..7983e71d22 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs @@ -717,8 +717,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()); @@ -756,7 +756,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -804,10 +804,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")); @@ -815,7 +815,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -846,10 +846,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = RotationalStiffness.FromNewtonMetersPerRadian(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs index c74314396d..caba1c4372 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = SolidAngle.FromSteradians(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs index 26758681b1..80deb2fd08 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs @@ -613,8 +613,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()); @@ -644,7 +644,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -684,10 +684,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")); @@ -695,7 +695,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -726,10 +726,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = SpecificEnergy.FromJoulesPerKilogram(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs index 42e3875924..a5466def96 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs @@ -405,8 +405,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()); @@ -420,7 +420,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -444,10 +444,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")); @@ -455,7 +455,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -486,10 +486,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = SpecificEntropy.FromJoulesPerKilogramKelvin(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs index 78bbf330e8..dd61769406 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs @@ -327,8 +327,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()); @@ -336,7 +336,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -354,10 +354,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")); @@ -365,7 +365,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -396,10 +396,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = SpecificVolume.FromCubicMetersPerKilogram(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs index b4ffa0649f..29b5e24cee 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs @@ -509,8 +509,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()); @@ -532,7 +532,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -564,10 +564,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")); @@ -575,7 +575,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -606,10 +606,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = SpecificWeight.FromNewtonsPerCubicMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs index ca618db312..99d427f498 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs @@ -704,8 +704,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()); @@ -742,7 +742,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -789,10 +789,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")); @@ -800,7 +800,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -831,10 +831,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Speed.FromMetersPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs index bcf8f66f5e..77b78cd9df 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs @@ -418,8 +418,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()); @@ -434,7 +434,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -459,10 +459,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")); @@ -470,7 +470,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -501,10 +501,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = TemperatureChangeRate.FromDegreesCelsiusPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs index 701405483b..8a31ab1c63 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs @@ -405,8 +405,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()); @@ -420,7 +420,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -444,10 +444,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")); @@ -455,7 +455,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -486,10 +486,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = TemperatureDelta.FromKelvins(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs index 15bebb3f2d..3d7d89d7d1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs @@ -406,8 +406,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()); @@ -422,7 +422,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -447,10 +447,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")); @@ -458,7 +458,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -489,10 +489,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Temperature.FromKelvins(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs index e333aa2023..544b59684d 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs @@ -314,15 +314,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; } } @@ -339,10 +339,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")); @@ -350,7 +350,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -381,10 +381,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ThermalConductivity.FromWattsPerMeterKelvin(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs index fb86d52699..28bb3e55c1 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs @@ -353,8 +353,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()); @@ -364,7 +364,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -384,10 +384,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")); @@ -395,7 +395,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -426,10 +426,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = ThermalResistance.FromSquareMeterKelvinsPerKilowatt(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs index f5bfc4c2de..0b7e50db09 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs @@ -561,8 +561,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()); @@ -588,7 +588,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -624,10 +624,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")); @@ -635,7 +635,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -666,10 +666,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = TorquePerLength.FromNewtonMetersPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs index 9c641c3f06..4f943a430c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs @@ -561,8 +561,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()); @@ -588,7 +588,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -624,10 +624,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")); @@ -635,7 +635,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -666,10 +666,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Torque.FromNewtonMeters(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs index b54ba26f2d..8d76f94201 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs @@ -301,14 +301,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; } } @@ -324,10 +324,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")); @@ -335,7 +335,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -366,10 +366,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = VitaminA.FromInternationalUnits(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs index 60cfa492d2..cdfc91ff92 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs @@ -548,8 +548,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()); @@ -574,7 +574,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -609,10 +609,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")); @@ -620,7 +620,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -651,10 +651,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = VolumeConcentration.FromDecimalFractions(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs index 7b02e1cc04..49ce65f858 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs @@ -925,8 +925,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()); @@ -980,7 +980,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -1044,10 +1044,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")); @@ -1055,7 +1055,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -1086,10 +1086,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = VolumeFlow.FromCubicMetersPerSecond(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs index 4db337c2be..8707f198bb 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs @@ -379,8 +379,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()); @@ -392,7 +392,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -414,10 +414,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")); @@ -425,7 +425,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -456,10 +456,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = VolumePerLength.FromCubicMetersPerMeter(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs index 243c95c90a..0f94e82ea3 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs @@ -938,8 +938,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()); @@ -994,7 +994,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() } finally { - Thread.CurrentThread.CurrentUICulture = prevCulture; + Thread.CurrentThread.CurrentCulture = prevCulture; } } @@ -1059,10 +1059,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")); @@ -1070,7 +1070,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul } finally { - CultureInfo.CurrentUICulture = oldCulture; + CultureInfo.CurrentCulture = oldCulture; } } @@ -1101,10 +1101,10 @@ public void ToString_NullArgs_ThrowsArgumentNullException() } [Fact] - public void ToString_NullProvider_EqualsCurrentUICulture() + public void ToString_NullProvider_EqualsCurrentCulture() { var quantity = Volume.FromCubicMeters(1.0); - Assert.Equal(quantity.ToString(CultureInfo.CurrentUICulture, "g"), quantity.ToString(null, "g")); + Assert.Equal(quantity.ToString(CultureInfo.CurrentCulture, "g"), quantity.ToString(null, "g")); } #pragma warning restore 612, 618 diff --git a/UnitsNet.Tests/QuantityIConvertibleTests.cs b/UnitsNet.Tests/QuantityIConvertibleTests.cs index 698d4ce9b9..2f63426df5 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 5103231a36..49611abb11 100644 --- a/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs +++ b/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs @@ -242,15 +242,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"); @@ -264,7 +263,6 @@ public void GetDefaultAbbreviationFallsBackToUsEnglishCulture() finally { CultureInfo.CurrentCulture = oldCurrentCulture; - CultureInfo.CurrentUICulture = oldCurrentUICulture; } } diff --git a/UnitsNet/CustomCode/GlobalConfiguration.cs b/UnitsNet/CustomCode/GlobalConfiguration.cs index 746e98dc65..3407332be1 100644 --- a/UnitsNet/CustomCode/GlobalConfiguration.cs +++ b/UnitsNet/CustomCode/GlobalConfiguration.cs @@ -12,17 +12,17 @@ namespace UnitsNet /// Global configuration for culture, used as default culture in methods like and /// . /// - [Obsolete("The only property DefaultCulture is now deprecated. Manipulate Thread.CurrentThread.CurrentUICulture instead.")] + [Obsolete("The only property DefaultCulture is now deprecated. Manipulate Thread.CurrentThread.CurrentCulture instead.")] public static class GlobalConfiguration { /// - /// Wrapper for . + /// Wrapper for . /// - [Obsolete("Manipulate Thread.CurrentThread.CurrentUICulture instead, this property will be removed.")] + [Obsolete("Manipulate Thread.CurrentThread.CurrentCulture instead, this property will be removed.")] public static IFormatProvider DefaultCulture { - get => Thread.CurrentThread.CurrentUICulture; - set => Thread.CurrentThread.CurrentUICulture = (CultureInfo) value; + get => Thread.CurrentThread.CurrentCulture; + set => Thread.CurrentThread.CurrentCulture = (CultureInfo) value; } } } diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs index c69d65fabf..e0b8d55a66 100644 --- a/UnitsNet/CustomCode/Quantities/Length.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs @@ -211,11 +211,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 b28c958182..b360bd7204 100644 --- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs @@ -127,11 +127,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 7b3693d270..0380d51ea4 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -74,7 +74,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 a0b52ff101..6dc51427f3 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -73,7 +73,7 @@ private void LoadGeneratedAbbreviations() [PublicAPI] 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); } /// @@ -86,7 +86,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); } /// @@ -95,7 +95,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. [PublicAPI] @@ -116,7 +116,7 @@ public void MapUnitToAbbreviation(TUnitType unit, IFormatProvider for /// 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. [PublicAPI] @@ -138,7 +138,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. [PublicAPI] public void MapUnitToAbbreviation(Type unitType, int unitValue, IFormatProvider formatProvider, [NotNull] params string[] abbreviations) @@ -153,7 +153,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. [PublicAPI] public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider formatProvider, [NotNull] string abbreviation) @@ -169,7 +169,7 @@ private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatPro if (abbreviations == null) throw new ArgumentNullException(nameof(abbreviations)); - formatProvider = formatProvider ?? CultureInfo.CurrentUICulture; + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider)) quantitiesForProvider = _lookupsForCulture[formatProvider] = new UnitTypeToLookup(); @@ -188,7 +188,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. [PublicAPI] @@ -223,7 +223,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. [PublicAPI] public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider = null) @@ -253,7 +253,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. [PublicAPI] public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider? formatProvider = null) where TUnitType : Enum @@ -266,12 +266,12 @@ 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. [PublicAPI] 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)) return formatProvider != FallbackCulture ? GetUnitAbbreviations(unitType, unitValue, FallbackCulture) : new string[] { }; @@ -287,12 +287,12 @@ 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. [PublicAPI] public string[] GetAllUnitAbbreviationsForQuantity(Type unitEnumType, IFormatProvider? formatProvider = null) { - formatProvider = formatProvider ?? CultureInfo.CurrentUICulture; + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; if(!TryGetUnitValueAbbreviationLookup(unitEnumType, formatProvider, out var lookup)) return formatProvider != FallbackCulture ? GetAllUnitAbbreviationsForQuantity(unitEnumType, FallbackCulture) : new string[] { }; @@ -304,7 +304,7 @@ internal bool TryGetUnitValueAbbreviationLookup(Type unitType, IFormatProvider? { unitToAbbreviations = null; - formatProvider = formatProvider ?? CultureInfo.CurrentUICulture; + formatProvider = formatProvider ?? CultureInfo.CurrentCulture; if(!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider)) return formatProvider != FallbackCulture ? TryGetUnitValueAbbreviationLookup(unitType, FallbackCulture, out unitToAbbreviations) : false; diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs index 2becb1fd4d..6ed670d059 100644 --- a/UnitsNet/CustomCode/UnitParser.cs +++ b/UnitsNet/CustomCode/UnitParser.cs @@ -44,7 +44,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. /// /// [PublicAPI] @@ -62,7 +62,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. @@ -148,7 +148,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. @@ -182,7 +182,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. [PublicAPI] diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index ed7f90771b..7cbed9d04e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -261,7 +261,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); @@ -453,7 +453,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( @@ -484,7 +484,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( @@ -512,7 +512,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")); /// @@ -538,7 +538,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); @@ -890,7 +890,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,7 +901,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -916,14 +916,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -932,21 +932,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 94b3ca9fd8..46b8d06d10 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -273,7 +273,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); @@ -483,7 +483,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( @@ -514,7 +514,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( @@ -542,7 +542,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")); /// @@ -568,7 +568,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); @@ -924,7 +924,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,7 +935,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -950,14 +950,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -966,21 +966,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 899d516ff6..29782f3b28 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -207,7 +207,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); @@ -318,7 +318,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( @@ -349,7 +349,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( @@ -377,7 +377,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")); /// @@ -403,7 +403,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); @@ -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); @@ -756,7 +756,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -771,14 +771,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -787,21 +787,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 7299ad8473..40a5b35554 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -267,7 +267,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); @@ -468,7 +468,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( @@ -499,7 +499,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( @@ -527,7 +527,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")); /// @@ -553,7 +553,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); @@ -907,7 +907,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); @@ -918,7 +918,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -933,14 +933,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -949,21 +949,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 895523d500..7f58404bb9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 269c94cd4d..8ee6e54b29 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -207,7 +207,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); @@ -318,7 +318,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( @@ -349,7 +349,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( @@ -377,7 +377,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")); /// @@ -403,7 +403,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); @@ -737,7 +737,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,7 +748,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -763,14 +763,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -779,21 +779,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 d5f3d94ed7..4034e529c3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -267,7 +267,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); @@ -468,7 +468,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( @@ -499,7 +499,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( @@ -527,7 +527,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")); /// @@ -553,7 +553,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); @@ -907,7 +907,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); @@ -918,7 +918,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -933,14 +933,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -949,21 +949,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 e5b4215ceb..c8627e9258 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -189,7 +189,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); @@ -273,7 +273,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( @@ -304,7 +304,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( @@ -332,7 +332,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")); /// @@ -358,7 +358,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); @@ -686,7 +686,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,7 +697,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -712,14 +712,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -728,21 +728,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 8d9872efab..8848c3b7ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -219,7 +219,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); @@ -348,7 +348,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( @@ -379,7 +379,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( @@ -407,7 +407,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")); /// @@ -433,7 +433,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); @@ -771,7 +771,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,7 +782,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -797,14 +797,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -813,21 +813,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 c7e6ad0c0e..08a59ac16f 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -344,7 +344,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); @@ -653,7 +653,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( @@ -684,7 +684,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( @@ -712,7 +712,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")); /// @@ -738,7 +738,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); @@ -1116,7 +1116,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); @@ -1127,7 +1127,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1142,14 +1142,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1158,21 +1158,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 ec856aa869..ac3db8f08c 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 cfdce7831f..0bf14c62a2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -228,7 +228,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); @@ -366,7 +366,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( @@ -397,7 +397,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( @@ -425,7 +425,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")); /// @@ -451,7 +451,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); @@ -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); @@ -802,7 +802,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -817,14 +817,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -833,21 +833,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 284ff62318..ff59cca929 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 da5c1bbd5b..e6be1cbd32 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -426,7 +426,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); @@ -861,7 +861,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( @@ -892,7 +892,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( @@ -920,7 +920,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")); /// @@ -946,7 +946,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); @@ -1352,7 +1352,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); @@ -1363,7 +1363,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1378,14 +1378,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1394,21 +1394,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 8dfbec5b24..05ff5a8fc8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -243,7 +243,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); @@ -408,7 +408,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( @@ -439,7 +439,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( @@ -467,7 +467,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")); /// @@ -493,7 +493,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); @@ -839,7 +839,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,7 +850,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -865,14 +865,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -881,21 +881,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 3ced8d43ee..e66c9604c6 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -240,7 +240,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); @@ -396,7 +396,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( @@ -427,7 +427,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( @@ -455,7 +455,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")); /// @@ -481,7 +481,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); @@ -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); @@ -836,7 +836,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -851,14 +851,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -867,21 +867,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 4d32562157..a5ec194d04 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -207,7 +207,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); @@ -318,7 +318,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( @@ -349,7 +349,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( @@ -377,7 +377,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")); /// @@ -403,7 +403,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); @@ -737,7 +737,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,7 +748,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -763,14 +763,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -779,21 +779,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 d441ab525e..021368f01f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -216,7 +216,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); @@ -336,7 +336,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( @@ -367,7 +367,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( @@ -395,7 +395,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")); /// @@ -421,7 +421,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); @@ -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); @@ -768,7 +768,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -783,14 +783,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -799,21 +799,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 7eee888c9e..8834e0f7e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 9057adb96e..728db838a8 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -204,7 +204,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); @@ -306,7 +306,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( @@ -337,7 +337,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( @@ -365,7 +365,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")); /// @@ -391,7 +391,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); @@ -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); @@ -734,7 +734,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -749,14 +749,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -765,21 +765,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 d55f01f9c8..cd20fcf175 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -204,7 +204,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); @@ -306,7 +306,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( @@ -337,7 +337,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( @@ -365,7 +365,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")); /// @@ -391,7 +391,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); @@ -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); @@ -734,7 +734,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -749,14 +749,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -765,21 +765,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 23877d8b2b..d1090ddf97 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -231,7 +231,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); @@ -378,7 +378,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( @@ -409,7 +409,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( @@ -437,7 +437,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")); /// @@ -463,7 +463,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); @@ -805,7 +805,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,7 +816,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -831,14 +831,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -847,21 +847,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 25fbd5bc4c..c1c2590ca2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -204,7 +204,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); @@ -306,7 +306,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( @@ -337,7 +337,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( @@ -365,7 +365,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")); /// @@ -391,7 +391,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); @@ -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); @@ -734,7 +734,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -749,14 +749,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -765,21 +765,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 e76eaeaa5c..7ed129cfa9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -189,7 +189,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); @@ -273,7 +273,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( @@ -304,7 +304,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( @@ -332,7 +332,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")); /// @@ -358,7 +358,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); @@ -686,7 +686,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,7 +697,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -712,14 +712,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -728,21 +728,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 9a611d2ece..b5178e7113 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 a35692e319..fc1516e5a3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -210,7 +210,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); @@ -321,7 +321,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( @@ -352,7 +352,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( @@ -380,7 +380,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")); /// @@ -406,7 +406,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); @@ -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); @@ -751,7 +751,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -766,14 +766,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -782,21 +782,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 7bbac7191b..f3d1b06af2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -213,7 +213,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); @@ -333,7 +333,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( @@ -364,7 +364,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( @@ -392,7 +392,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")); /// @@ -418,7 +418,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); @@ -754,7 +754,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,7 +765,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -780,14 +780,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -796,21 +796,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 652d9c8d04..d139dd0cf6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -213,7 +213,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); @@ -333,7 +333,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( @@ -364,7 +364,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( @@ -392,7 +392,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")); /// @@ -418,7 +418,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); @@ -754,7 +754,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,7 +765,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -780,14 +780,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -796,21 +796,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 dc66e7a1aa..0776181dd6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -303,7 +303,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); @@ -558,7 +558,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( @@ -589,7 +589,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( @@ -617,7 +617,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")); /// @@ -643,7 +643,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); @@ -1009,7 +1009,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); @@ -1020,7 +1020,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1035,14 +1035,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1051,21 +1051,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 e22e2c3ad7..cbb34d2982 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -213,7 +213,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); @@ -333,7 +333,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( @@ -364,7 +364,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( @@ -392,7 +392,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")); /// @@ -418,7 +418,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); @@ -754,7 +754,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,7 +765,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -780,14 +780,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -796,21 +796,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 83f7f5476d..5f8f2f90fb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -213,7 +213,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); @@ -333,7 +333,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( @@ -364,7 +364,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( @@ -392,7 +392,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")); /// @@ -418,7 +418,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); @@ -754,7 +754,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,7 +765,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -780,14 +780,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -796,21 +796,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 41d0b2791d..39fd0cc52f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -270,7 +270,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); @@ -471,7 +471,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( @@ -502,7 +502,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( @@ -530,7 +530,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")); /// @@ -556,7 +556,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); @@ -910,7 +910,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,7 +921,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -936,14 +936,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -952,21 +952,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 98ce454741..a8d8d2eb0c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -204,7 +204,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); @@ -306,7 +306,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( @@ -337,7 +337,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( @@ -365,7 +365,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")); /// @@ -391,7 +391,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); @@ -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); @@ -734,7 +734,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -749,14 +749,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -765,21 +765,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 eb59bdee80..92b9bfe54e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -393,7 +393,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); @@ -783,7 +783,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( @@ -814,7 +814,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( @@ -842,7 +842,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")); /// @@ -868,7 +868,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); @@ -1264,7 +1264,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,7 +1275,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1290,14 +1290,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1306,21 +1306,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 4d22327766..4687d4f228 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -225,7 +225,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); @@ -363,7 +363,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( @@ -394,7 +394,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( @@ -422,7 +422,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")); /// @@ -448,7 +448,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); @@ -788,7 +788,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,7 +799,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -814,14 +814,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -830,21 +830,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 4ae5d7bb02..8ab736e06c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -267,7 +267,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); @@ -468,7 +468,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( @@ -499,7 +499,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( @@ -527,7 +527,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")); /// @@ -553,7 +553,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); @@ -907,7 +907,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); @@ -918,7 +918,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -933,14 +933,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -949,21 +949,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 6b0737e640..4d3d13e72e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -249,7 +249,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); @@ -423,7 +423,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( @@ -454,7 +454,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( @@ -482,7 +482,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")); /// @@ -508,7 +508,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); @@ -856,7 +856,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,7 +867,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -882,14 +882,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -898,21 +898,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 fd12e2a781..b9af352d3e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -411,7 +411,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); @@ -828,7 +828,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( @@ -859,7 +859,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( @@ -887,7 +887,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")); /// @@ -913,7 +913,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); @@ -1315,7 +1315,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); @@ -1326,7 +1326,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1341,14 +1341,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1357,21 +1357,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 665f183951..d5adf5cd62 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -243,7 +243,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); @@ -408,7 +408,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( @@ -439,7 +439,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( @@ -467,7 +467,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")); /// @@ -493,7 +493,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); @@ -839,7 +839,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,7 +850,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -865,14 +865,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -881,21 +881,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 6fd8492a34..89097fb013 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -210,7 +210,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); @@ -321,7 +321,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( @@ -352,7 +352,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( @@ -380,7 +380,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")); /// @@ -406,7 +406,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); @@ -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); @@ -751,7 +751,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -766,14 +766,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -782,21 +782,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 06ec38a224..ef3f304bf1 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -291,7 +291,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); @@ -528,7 +528,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( @@ -559,7 +559,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( @@ -587,7 +587,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")); /// @@ -613,7 +613,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); @@ -975,7 +975,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,7 +986,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1001,14 +1001,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1017,21 +1017,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 346bd88420..7e68d957df 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 d18c6d8b5a..d06645bdce 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -210,7 +210,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); @@ -321,7 +321,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( @@ -352,7 +352,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( @@ -380,7 +380,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")); /// @@ -406,7 +406,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); @@ -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); @@ -751,7 +751,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -766,14 +766,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -782,21 +782,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 978d41bbbc..4953efb2fc 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -341,7 +341,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); @@ -650,7 +650,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( @@ -681,7 +681,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( @@ -709,7 +709,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")); /// @@ -735,7 +735,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); @@ -1113,7 +1113,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); @@ -1124,7 +1124,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1139,14 +1139,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1155,21 +1155,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 d6c42f7d9d..0822f19a4a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -267,7 +267,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); @@ -468,7 +468,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( @@ -499,7 +499,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( @@ -527,7 +527,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")); /// @@ -553,7 +553,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); @@ -907,7 +907,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); @@ -918,7 +918,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -933,14 +933,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -949,21 +949,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 aaa98eb2d5..4e630a7ff3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -228,7 +228,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); @@ -366,7 +366,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( @@ -397,7 +397,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( @@ -425,7 +425,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")); /// @@ -451,7 +451,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); @@ -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); @@ -802,7 +802,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -817,14 +817,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -833,21 +833,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 03d75963b2..dd416024e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -234,7 +234,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); @@ -381,7 +381,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( @@ -412,7 +412,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( @@ -440,7 +440,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")); /// @@ -466,7 +466,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); @@ -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); @@ -819,7 +819,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -834,14 +834,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -850,21 +850,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 7d2099b3f5..d45bbe1fe1 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs @@ -189,7 +189,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); @@ -273,7 +273,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( @@ -304,7 +304,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( @@ -332,7 +332,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")); /// @@ -358,7 +358,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); @@ -686,7 +686,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,7 +697,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -712,14 +712,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -728,21 +728,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 c22db172d0..ea4cb8c0f6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -381,7 +381,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); @@ -753,7 +753,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( @@ -784,7 +784,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( @@ -812,7 +812,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")); /// @@ -838,7 +838,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); @@ -1230,7 +1230,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,7 +1241,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1256,14 +1256,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1272,21 +1272,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 18af1e4ca9..28a496308c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -195,7 +195,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); @@ -288,7 +288,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( @@ -319,7 +319,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( @@ -347,7 +347,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")); /// @@ -373,7 +373,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); @@ -711,7 +711,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); @@ -722,7 +722,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -737,14 +737,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -753,21 +753,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 9b16f87531..306bb22ec6 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -270,7 +270,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); @@ -471,7 +471,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( @@ -502,7 +502,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( @@ -530,7 +530,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")); /// @@ -556,7 +556,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); @@ -910,7 +910,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,7 +921,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -936,14 +936,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -952,21 +952,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 82a4b2473d..6ac2e3da4c 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -336,7 +336,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); @@ -636,7 +636,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( @@ -667,7 +667,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( @@ -695,7 +695,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")); /// @@ -721,7 +721,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); @@ -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); @@ -1108,7 +1108,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1123,14 +1123,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1139,21 +1139,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 893315f5ad..85d5e29714 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -270,7 +270,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); @@ -471,7 +471,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( @@ -502,7 +502,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( @@ -530,7 +530,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")); /// @@ -556,7 +556,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); @@ -910,7 +910,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,7 +921,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -936,14 +936,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -952,21 +952,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 c0de33ed2c..1d58543f2a 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 bd25c55a5a..538128a5af 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 7a54cac4c8..9aed318602 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -210,7 +210,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); @@ -321,7 +321,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( @@ -352,7 +352,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( @@ -380,7 +380,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")); /// @@ -406,7 +406,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); @@ -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); @@ -751,7 +751,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -766,14 +766,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -782,21 +782,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 6a56f32260..558a0218ae 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 c0aab8d7e2..87b94043f7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 96ce9ba4e1..9ac98313a5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -333,7 +333,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); @@ -633,7 +633,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( @@ -664,7 +664,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( @@ -692,7 +692,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")); /// @@ -718,7 +718,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); @@ -1094,7 +1094,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,7 +1105,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1120,14 +1120,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1136,21 +1136,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 ea9cb23ba5..f5bba82183 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -426,7 +426,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); @@ -861,7 +861,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( @@ -892,7 +892,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( @@ -920,7 +920,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")); /// @@ -946,7 +946,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); @@ -1352,7 +1352,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); @@ -1363,7 +1363,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1378,14 +1378,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1394,21 +1394,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 cc95d72957..6f85d95e8d 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -381,7 +381,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); @@ -753,7 +753,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( @@ -784,7 +784,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( @@ -812,7 +812,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")); /// @@ -838,7 +838,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); @@ -1230,7 +1230,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,7 +1241,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1256,14 +1256,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1272,21 +1272,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 cddac285fe..841e6cb6d7 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -255,7 +255,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); @@ -438,7 +438,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( @@ -469,7 +469,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( @@ -497,7 +497,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")); /// @@ -523,7 +523,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); @@ -873,7 +873,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,7 +884,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -899,14 +899,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -915,21 +915,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 d600750a73..dcbfd09337 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -330,7 +330,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); @@ -621,7 +621,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( @@ -652,7 +652,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( @@ -680,7 +680,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")); /// @@ -706,7 +706,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); @@ -1080,7 +1080,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); @@ -1091,7 +1091,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1106,14 +1106,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1122,21 +1122,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 7c835aded4..9e91449668 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -351,7 +351,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); @@ -678,7 +678,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( @@ -709,7 +709,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( @@ -737,7 +737,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")); /// @@ -763,7 +763,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); @@ -1145,7 +1145,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); @@ -1156,7 +1156,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1171,14 +1171,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1187,21 +1187,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 e77db094c4..617d249592 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 0a174a328c..00792fdf5c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 afc0741065..eda34bd208 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -255,7 +255,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); @@ -438,7 +438,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( @@ -469,7 +469,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( @@ -497,7 +497,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")); /// @@ -523,7 +523,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); @@ -873,7 +873,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,7 +884,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -899,14 +899,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -915,21 +915,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 441038cbae..0659d5a85b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -234,7 +234,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); @@ -381,7 +381,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( @@ -412,7 +412,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( @@ -440,7 +440,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")); /// @@ -466,7 +466,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); @@ -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); @@ -819,7 +819,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -834,14 +834,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -850,21 +850,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 0c483a2e0b..0f68376999 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 22611dc34f..915564657c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 40e4f2b80d..2053d737a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -335,7 +335,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); @@ -635,7 +635,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( @@ -666,7 +666,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( @@ -694,7 +694,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")); /// @@ -720,7 +720,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); @@ -1096,7 +1096,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); @@ -1107,7 +1107,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1122,14 +1122,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1138,21 +1138,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 dc133e4b44..812b3180e6 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -447,7 +447,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); @@ -918,7 +918,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( @@ -949,7 +949,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( @@ -977,7 +977,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")); /// @@ -1003,7 +1003,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); @@ -1417,7 +1417,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); @@ -1428,7 +1428,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1443,14 +1443,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1459,21 +1459,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 9406f5e527..17f599c3ca 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -195,7 +195,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); @@ -288,7 +288,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( @@ -319,7 +319,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( @@ -347,7 +347,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")); /// @@ -373,7 +373,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); @@ -711,7 +711,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); @@ -722,7 +722,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -737,14 +737,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -753,21 +753,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 02efb5dda6..54e4f67fd6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -435,7 +435,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); @@ -888,7 +888,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( @@ -919,7 +919,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( @@ -947,7 +947,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")); /// @@ -973,7 +973,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); @@ -1383,7 +1383,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); @@ -1394,7 +1394,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1409,14 +1409,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1425,21 +1425,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 47a2a95a60..fceb42196a 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -225,7 +225,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); @@ -363,7 +363,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( @@ -394,7 +394,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( @@ -422,7 +422,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")); /// @@ -448,7 +448,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); @@ -788,7 +788,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,7 +799,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -814,14 +814,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -830,21 +830,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 4a78e8b313..bc065e506c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -219,7 +219,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); @@ -348,7 +348,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( @@ -379,7 +379,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( @@ -407,7 +407,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")); /// @@ -433,7 +433,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); @@ -771,7 +771,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,7 +782,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -797,14 +797,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -813,21 +813,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 71f8f7652c..bb93a81632 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -195,7 +195,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); @@ -288,7 +288,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( @@ -319,7 +319,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( @@ -347,7 +347,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")); /// @@ -373,7 +373,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); @@ -703,7 +703,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,7 +714,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -729,14 +729,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -745,21 +745,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 f1a4e78f17..4eea57dd4b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 54cb0b2510..dcc2a5bb3b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -207,7 +207,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); @@ -318,7 +318,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( @@ -349,7 +349,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( @@ -377,7 +377,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")); /// @@ -403,7 +403,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); @@ -737,7 +737,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,7 +748,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -763,14 +763,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -779,21 +779,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 a509b07238..e607c92ec0 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -207,7 +207,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); @@ -318,7 +318,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( @@ -349,7 +349,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( @@ -377,7 +377,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")); /// @@ -403,7 +403,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); @@ -737,7 +737,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,7 +748,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -763,14 +763,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -779,21 +779,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 5b9a8a95c1..c0b51c376f 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -261,7 +261,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); @@ -453,7 +453,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( @@ -484,7 +484,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( @@ -512,7 +512,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")); /// @@ -538,7 +538,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); @@ -890,7 +890,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,7 +901,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -916,14 +916,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -932,21 +932,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 390a8b8cab..b54968933d 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -381,7 +381,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); @@ -753,7 +753,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( @@ -784,7 +784,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( @@ -812,7 +812,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")); /// @@ -838,7 +838,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); @@ -1230,7 +1230,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,7 +1241,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1256,14 +1256,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1272,21 +1272,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 01d17a8096..61d77f1350 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -213,7 +213,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); @@ -333,7 +333,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( @@ -364,7 +364,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( @@ -392,7 +392,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")); /// @@ -418,7 +418,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); @@ -754,7 +754,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,7 +765,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -780,14 +780,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -796,21 +796,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 8ab2aad5ba..75fe240e1e 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -192,7 +192,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); @@ -276,7 +276,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( @@ -307,7 +307,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( @@ -335,7 +335,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")); /// @@ -361,7 +361,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); @@ -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); @@ -700,7 +700,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -715,14 +715,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 621840c989..5e663f7092 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -336,7 +336,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); @@ -636,7 +636,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( @@ -667,7 +667,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( @@ -695,7 +695,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")); /// @@ -721,7 +721,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); @@ -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); @@ -1108,7 +1108,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1123,14 +1123,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1139,21 +1139,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 dfd71b9c55..f2ae2517ac 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -237,7 +237,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); @@ -393,7 +393,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( @@ -424,7 +424,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( @@ -452,7 +452,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")); /// @@ -478,7 +478,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); @@ -822,7 +822,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,7 +833,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -848,14 +848,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -864,21 +864,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 ea543e12f3..05f1294166 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -201,7 +201,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); @@ -303,7 +303,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( @@ -334,7 +334,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( @@ -362,7 +362,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")); /// @@ -388,7 +388,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); @@ -720,7 +720,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,7 +731,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -746,14 +746,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -762,21 +762,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 b54221b038..a413297024 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -288,7 +288,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); @@ -516,7 +516,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( @@ -547,7 +547,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( @@ -575,7 +575,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")); /// @@ -601,7 +601,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); @@ -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); @@ -972,7 +972,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -987,14 +987,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1003,21 +1003,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 12460402a7..7c8c33ca79 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -375,7 +375,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); @@ -738,7 +738,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( @@ -769,7 +769,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( @@ -797,7 +797,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")); /// @@ -823,7 +823,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); @@ -1213,7 +1213,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); @@ -1224,7 +1224,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1239,14 +1239,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1255,21 +1255,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 457489ea95..ff38d69059 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -243,7 +243,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); @@ -408,7 +408,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( @@ -439,7 +439,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( @@ -467,7 +467,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")); /// @@ -493,7 +493,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); @@ -793,7 +793,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); @@ -804,7 +804,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -819,14 +819,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -835,21 +835,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 d39c7fe412..98063901b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -243,7 +243,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); @@ -408,7 +408,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( @@ -439,7 +439,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( @@ -467,7 +467,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")); /// @@ -493,7 +493,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); @@ -839,7 +839,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,7 +850,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -865,14 +865,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -881,21 +881,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 c848c80097..02a08316f7 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -237,7 +237,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); @@ -393,7 +393,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( @@ -424,7 +424,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( @@ -452,7 +452,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")); /// @@ -478,7 +478,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); @@ -822,7 +822,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,7 +833,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -848,14 +848,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -864,21 +864,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 048426f900..7ee7f182ac 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -198,7 +198,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); @@ -291,7 +291,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( @@ -322,7 +322,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( @@ -350,7 +350,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")); /// @@ -376,7 +376,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); @@ -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); @@ -717,7 +717,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -732,14 +732,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -748,21 +748,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 4f415cffc9..f5c8af7b0b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -213,7 +213,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); @@ -333,7 +333,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( @@ -364,7 +364,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( @@ -392,7 +392,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")); /// @@ -418,7 +418,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); @@ -754,7 +754,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,7 +765,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -780,14 +780,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -796,21 +796,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 c34bd7af3b..de28fc0055 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -309,7 +309,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); @@ -573,7 +573,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( @@ -604,7 +604,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( @@ -632,7 +632,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")); /// @@ -658,7 +658,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); @@ -1026,7 +1026,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); @@ -1037,7 +1037,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1052,14 +1052,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1068,21 +1068,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 a3cc53ac38..f94afdf552 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -309,7 +309,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); @@ -573,7 +573,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( @@ -604,7 +604,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( @@ -632,7 +632,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")); /// @@ -658,7 +658,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); @@ -1026,7 +1026,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); @@ -1037,7 +1037,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1052,14 +1052,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1068,21 +1068,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 1389e35218..2fedeeb5a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -189,7 +189,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); @@ -273,7 +273,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( @@ -304,7 +304,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( @@ -332,7 +332,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")); /// @@ -358,7 +358,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); @@ -686,7 +686,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,7 +697,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -712,14 +712,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -728,21 +728,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 3772fe9c9a..59f230c034 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -483,7 +483,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); @@ -1008,7 +1008,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( @@ -1039,7 +1039,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( @@ -1067,7 +1067,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")); /// @@ -1093,7 +1093,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); @@ -1519,7 +1519,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); @@ -1530,7 +1530,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1545,14 +1545,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1561,21 +1561,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 0a8e0c65ae..66b52ebd2b 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -306,7 +306,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); @@ -561,7 +561,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( @@ -592,7 +592,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( @@ -620,7 +620,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")); /// @@ -646,7 +646,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); @@ -1012,7 +1012,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); @@ -1023,7 +1023,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1038,14 +1038,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1054,21 +1054,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 6e9d42012a..7b5f83e223 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -477,7 +477,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); @@ -993,7 +993,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( @@ -1024,7 +1024,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( @@ -1052,7 +1052,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")); /// @@ -1078,7 +1078,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); @@ -1502,7 +1502,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); @@ -1513,7 +1513,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -1528,14 +1528,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -1544,21 +1544,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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 6efb549f0a..6a37e16833 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -225,7 +225,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); @@ -363,7 +363,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( @@ -394,7 +394,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( @@ -422,7 +422,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")); /// @@ -448,7 +448,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); @@ -788,7 +788,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,7 +799,7 @@ public string ToString(IFormatProvider? provider) /// /// The number of significant digits after the radix point. /// 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. [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(IFormatProvider? provider, int significantDigitsAfterRadix) { @@ -814,14 +814,14 @@ public string ToString(IFormatProvider? provider, int significantDigitsAfterRadi /// 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. + /// 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(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.CurrentUICulture; + provider = provider ?? CultureInfo.CurrentCulture; var value = Convert.ToDouble(Value); var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args); @@ -830,21 +830,21 @@ public string ToString(IFormatProvider? provider, [NotNull] string format, [NotN /// /// - /// 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/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index fb8ac656d4..bf80197e00 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -574,7 +574,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 47526f35ca..5db3861f3e 100644 --- a/UnitsNet/IQuantity.cs +++ b/UnitsNet/IQuantity.cs @@ -73,7 +73,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); /// @@ -81,7 +81,7 @@ public interface IQuantity : IFormattable /// /// The number of significant digits after the radix point. /// 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. [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.")] string ToString(IFormatProvider? provider, int significantDigitsAfterRadix); @@ -91,7 +91,7 @@ public interface IQuantity : IFormattable /// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively." /// Arguments for string format. Value and unit are implictly included as arguments 0 and 1. /// String representation. - /// Format to use for localization and number formatting. Defaults to if null. + /// 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().")] string ToString(IFormatProvider? provider, [NotNull] string format, [NotNull] params object[] args); } diff --git a/UnitsNet/QuantityFormatter.cs b/UnitsNet/QuantityFormatter.cs index 3a774b4427..13d91f8a0d 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); } /// @@ -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,7 +125,7 @@ public static string Format(IQuantity quantity, string for public static string Format(IQuantity quantity, string format, IFormatProvider? formatProvider) where TUnitType : Enum { - formatProvider ??= CultureInfo.CurrentUICulture; + formatProvider ??= CultureInfo.CurrentCulture; if(string.IsNullOrWhiteSpace(format)) format = "g"; diff --git a/UnitsNet/UnitConverter.cs b/UnitsNet/UnitConverter.cs index 781912cb36..4a2e3d94f4 100644 --- a/UnitsNet/UnitConverter.cs +++ b/UnitsNet/UnitConverter.cs @@ -429,7 +429,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); @@ -506,7 +506,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;