diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
index 3c39933687..50f05679a1 100644
--- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
@@ -334,7 +334,7 @@ public static string GetAbbreviation({_unitEnumName} unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation({_unitEnumName} unit, IFormatProvider? provider)
{{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -437,7 +437,7 @@ private void GenerateStaticParseMethods()
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static {_quantity.Name} Parse(string str, IFormatProvider? provider)
{{
return QuantityParser.Default.Parse<{_quantity.Name}, {_unitEnumName}>(
@@ -468,7 +468,7 @@ public static bool TryParse(string? str, out {_quantity.Name} result)
///
/// Length.Parse(""5.5 m"", new CultureInfo(""en-US""));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out {_quantity.Name} result)
{{
return QuantityParser.Default.TryParse<{_quantity.Name}, {_unitEnumName}>(
@@ -496,7 +496,7 @@ public static bool TryParse(string? str, IFormatProvider? provider, out {_quanti
/// Parse a unit string.
///
/// String to parse. Typically in the form: {{number}} {{unit}}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit(""m"", new CultureInfo(""en-US""));
///
@@ -522,7 +522,7 @@ public static bool TryParseUnit(string str, out {_unitEnumName} unit)
///
/// Length.TryParseUnit(""m"", new CultureInfo(""en-US""));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out {_unitEnumName} unit)
{{
return UnitParser.Default.TryParse<{_unitEnumName}>(str, provider, out unit);
@@ -925,7 +925,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);
@@ -933,21 +933,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{{
diff --git a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
index 021d8e765b..2374cb83b3 100644
--- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
@@ -99,7 +99,7 @@ public static bool TryFrom(QuantityValue value, Enum unit, out IQuantity? quanti
///
/// Try to dynamically parse a quantity string representation.
///
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Type of quantity, such as .
/// Quantity string representation, such as ""1.5 kg"". Must be compatible with given quantity type.
/// The resulting quantity if successful, otherwise default.
diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
index 6928bfc736..fe007b5ec2 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;
}}
}}
@@ -490,10 +490,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData(""g"")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{{
var quantity = {_quantity.Name}.From{_baseUnit.PluralName}(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}}
[Fact]
diff --git a/README.md b/README.md
index cc49212b62..84c2cadf90 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,7 @@ RotationalSpeed r = Angle.FromDegrees(90) / TimeSpan.FromSeconds(2);
### Culture and Localization
-The culture for abbreviations defaults to Thread.CurrentUICulture and falls back to US English if not defined. Thread.CurrentCulture affects number formatting unless a custom culture is specified. The relevant methods are:
+The culture for abbreviations defaults to Thread.CurrentCulture and falls back to US English if not defined. Thread.CurrentCulture affects number formatting unless a custom culture is specified. The relevant methods are:
* ToString()
* GetAbbreviation()
@@ -93,8 +93,9 @@ var usEnglish = new CultureInfo("en-US");
var russian = new CultureInfo("ru-RU");
var oneKg = Mass.FromKilograms(1);
-// ToString() uses CurrentUICulture for abbreviation language and CurrentCulture for number formatting
-Thread.CurrentThread.CurrentUICulture = russian;
+// ToString() uses CurrentCulture for abbreviation language number formatting. This is consistent with the behavior of the .NET Framework,
+// where DateTime.ToString() uses CurrentCulture for the whole string, likely because mixing an english date format with a russian month name might be confusing.
+Thread.CurrentThread.CurrentCulture = russian;
string kgRu = oneKg.ToString(); // "1 кг"
// ToString() with specific culture and custom string format pattern
diff --git a/UnitsNet.Tests/CustomCode/StonePoundsTests.cs b/UnitsNet.Tests/CustomCode/StonePoundsTests.cs
index 76803c88d6..1191f3dc50 100644
--- a/UnitsNet.Tests/CustomCode/StonePoundsTests.cs
+++ b/UnitsNet.Tests/CustomCode/StonePoundsTests.cs
@@ -35,7 +35,7 @@ public void StonePoundsToString_FormatsNumberInDefaultCulture()
{
Mass m = Mass.FromStonePounds(3500, 1);
StonePounds stonePounds = m.StonePounds;
- string numberInCurrentCulture = 3500.ToString("n0", CultureInfo.CurrentUICulture); // Varies between machines, can't hard code it
+ string numberInCurrentCulture = 3500.ToString("n0", CultureInfo.CurrentCulture); // Varies between machines, can't hard code it
Assert.Equal($"{numberInCurrentCulture} st 1 lb", stonePounds.ToString());
}
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs
index 48b78e3959..1b6ebf73f5 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs
@@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cm/s²", new Acceleration(1, AccelerationUnit.CentimeterPerSecondSquared).ToString());
Assert.Equal("1 dm/s²", new Acceleration(1, AccelerationUnit.DecimeterPerSecondSquared).ToString());
@@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s1"));
Assert.Equal("0.12 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s2"));
Assert.Equal("0.123 m/s²", new Acceleration(0.123456, AccelerationUnit.MeterPerSecondSquared).ToString("s3"));
@@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Acceleration.FromMetersPerSecondSquared(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs
index 6df945f8a4..8155ff8eff 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmountOfSubstanceTestsBase.g.cs
@@ -474,8 +474,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.Centimole).ToString());
Assert.Equal("1 clbmol", new AmountOfSubstance(1, AmountOfSubstanceUnit.CentipoundMole).ToString());
@@ -495,7 +495,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -525,10 +525,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s1"));
Assert.Equal("0.12 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s2"));
Assert.Equal("0.123 mol", new AmountOfSubstance(0.123456, AmountOfSubstanceUnit.Mole).ToString("s3"));
@@ -536,7 +536,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -566,10 +566,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = AmountOfSubstance.FromMoles(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs
index d756cc753f..029a660a52 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AmplitudeRatioTestsBase.g.cs
@@ -335,8 +335,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 dBµV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelMicrovolt).ToString());
Assert.Equal("1 dBmV", new AmplitudeRatio(1, AmplitudeRatioUnit.DecibelMillivolt).ToString());
@@ -345,7 +345,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -364,10 +364,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s1"));
Assert.Equal("0.12 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s2"));
Assert.Equal("0.123 dBV", new AmplitudeRatio(0.123456, AmplitudeRatioUnit.DecibelVolt).ToString("s3"));
@@ -375,7 +375,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -405,10 +405,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = AmplitudeRatio.FromDecibelVolts(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs
index 7f1cea4263..d8fa56abaf 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs
@@ -487,8 +487,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 '", new Angle(1, AngleUnit.Arcminute).ToString());
Assert.Equal("1 ″", new Angle(1, AngleUnit.Arcsecond).ToString());
@@ -509,7 +509,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -540,10 +540,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 °", new Angle(0.123456, AngleUnit.Degree).ToString("s1"));
Assert.Equal("0.12 °", new Angle(0.123456, AngleUnit.Degree).ToString("s2"));
Assert.Equal("0.123 °", new Angle(0.123456, AngleUnit.Degree).ToString("s3"));
@@ -551,7 +551,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -581,10 +581,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Angle.FromDegrees(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs
index d568bf6438..3bf958cb62 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentEnergyTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kVAh", new ApparentEnergy(1, ApparentEnergyUnit.KilovoltampereHour).ToString());
Assert.Equal("1 MVAh", new ApparentEnergy(1, ApparentEnergyUnit.MegavoltampereHour).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s1"));
Assert.Equal("0.12 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s2"));
Assert.Equal("0.123 VAh", new ApparentEnergy(0.123456, ApparentEnergyUnit.VoltampereHour).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ApparentEnergy.FromVoltampereHours(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs
index 9f147d9abf..672fa5e4e1 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ApparentPowerTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 GVA", new ApparentPower(1, ApparentPowerUnit.Gigavoltampere).ToString());
Assert.Equal("1 kVA", new ApparentPower(1, ApparentPowerUnit.Kilovoltampere).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s1"));
Assert.Equal("0.12 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s2"));
Assert.Equal("0.123 VA", new ApparentPower(0.123456, ApparentPowerUnit.Voltampere).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ApparentPower.FromVoltamperes(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs
index 2f0c2b3c3d..cecd3658ca 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaDensityTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kg/m²", new AreaDensity(1, AreaDensityUnit.KilogramPerSquareMeter).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s1"));
Assert.Equal("0.12 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s2"));
Assert.Equal("0.123 kg/m²", new AreaDensity(0.123456, AreaDensityUnit.KilogramPerSquareMeter).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = AreaDensity.FromKilogramsPerSquareMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs
index 5f1477116d..9f2d412306 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs
@@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cm⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.CentimeterToTheFourth).ToString());
Assert.Equal("1 dm⁴", new AreaMomentOfInertia(1, AreaMomentOfInertiaUnit.DecimeterToTheFourth).ToString());
@@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s1"));
Assert.Equal("0.12 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s2"));
Assert.Equal("0.123 m⁴", new AreaMomentOfInertia(0.123456, AreaMomentOfInertiaUnit.MeterToTheFourth).ToString("s3"));
@@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = AreaMomentOfInertia.FromMetersToTheFourth(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs
index 6d55b7b8a2..f80c5c4f56 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs
@@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 ac", new Area(1, AreaUnit.Acre).ToString());
Assert.Equal("1 ha", new Area(1, AreaUnit.Hectare).ToString());
@@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s1"));
Assert.Equal("0.12 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s2"));
Assert.Equal("0.123 m²", new Area(0.123456, AreaUnit.SquareMeter).ToString("s3"));
@@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Area.FromSquareMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs
index ea52ebe637..6b887b6091 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs
@@ -592,8 +592,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 bit/s", new BitRate(1, BitRateUnit.BitPerSecond).ToString());
Assert.Equal("1 B/s", new BitRate(1, BitRateUnit.BytePerSecond).ToString());
@@ -624,7 +624,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -665,10 +665,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s1"));
Assert.Equal("0.12 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s2"));
Assert.Equal("0.123 bit/s", new BitRate(0.123456m, BitRateUnit.BitPerSecond).ToString("s3"));
@@ -676,7 +676,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -706,10 +706,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = BitRate.FromBitsPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs
index fd5bddda09..b3e13df8f5 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/BrakeSpecificFuelConsumptionTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 g/kWh", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour).ToString());
Assert.Equal("1 kg/J", new BrakeSpecificFuelConsumption(1, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s1"));
Assert.Equal("0.12 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s2"));
Assert.Equal("0.123 kg/J", new BrakeSpecificFuelConsumption(0.123456, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs
index 3825bd5774..39f605fc99 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CapacitanceTestsBase.g.cs
@@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 F", new Capacitance(1, CapacitanceUnit.Farad).ToString());
Assert.Equal("1 kF", new Capacitance(1, CapacitanceUnit.Kilofarad).ToString());
@@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s1"));
Assert.Equal("0.12 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s2"));
Assert.Equal("0.123 F", new Capacitance(0.123456, CapacitanceUnit.Farad).ToString("s3"));
@@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Capacitance.FromFarads(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs
index 0bcf0aed97..cbcd63edfb 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/CoefficientOfThermalExpansionTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 °C⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseDegreeCelsius).ToString());
Assert.Equal("1 °F⁻¹", new CoefficientOfThermalExpansion(1, CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s1"));
Assert.Equal("0.12 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s2"));
Assert.Equal("0.123 K⁻¹", new CoefficientOfThermalExpansion(0.123456, CoefficientOfThermalExpansionUnit.InverseKelvin).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = CoefficientOfThermalExpansion.FromInverseKelvin(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
index b4757fb314..5efb74f49d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
@@ -799,8 +799,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cg/dl", new Density(1, DensityUnit.CentigramPerDeciliter).ToString());
Assert.Equal("1 cg/L", new Density(1, DensityUnit.CentigramPerLiter).ToString());
@@ -845,7 +845,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -900,10 +900,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s1"));
Assert.Equal("0.12 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s2"));
Assert.Equal("0.123 kg/m³", new Density(0.123456, DensityUnit.KilogramPerCubicMeter).ToString("s3"));
@@ -911,7 +911,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -941,10 +941,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Density.FromKilogramsPerCubicMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs
index 2e19791280..c5382bd6c0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DurationTestsBase.g.cs
@@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 d", new Duration(1, DurationUnit.Day).ToString());
Assert.Equal("1 h", new Duration(1, DurationUnit.Hour).ToString());
@@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 s", new Duration(0.123456, DurationUnit.Second).ToString("s1"));
Assert.Equal("0.12 s", new Duration(0.123456, DurationUnit.Second).ToString("s2"));
Assert.Equal("0.123 s", new Duration(0.123456, DurationUnit.Second).ToString("s3"));
@@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Duration.FromSeconds(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs
index 79f3183d5f..b07e089b4b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/DynamicViscosityTestsBase.g.cs
@@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cP", new DynamicViscosity(1, DynamicViscosityUnit.Centipoise).ToString());
Assert.Equal("1 µPa·s", new DynamicViscosity(1, DynamicViscosityUnit.MicropascalSecond).ToString());
@@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s1"));
Assert.Equal("0.12 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s2"));
Assert.Equal("0.123 Ns/m²", new DynamicViscosity(0.123456, DynamicViscosityUnit.NewtonSecondPerMeterSquared).ToString("s3"));
@@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = DynamicViscosity.FromNewtonSecondsPerMeterSquared(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
index 48b29f1876..af17d29c73 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 µS", new ElectricAdmittance(1, ElectricAdmittanceUnit.Microsiemens).ToString());
Assert.Equal("1 mS", new ElectricAdmittance(1, ElectricAdmittanceUnit.Millisiemens).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s1"));
Assert.Equal("0.12 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s2"));
Assert.Equal("0.123 S", new ElectricAdmittance(0.123456, ElectricAdmittanceUnit.Siemens).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricAdmittance.FromSiemens(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs
index 0e489d95f2..421022d475 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeDensityTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 C/m³", new ElectricChargeDensity(1, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s1"));
Assert.Equal("0.12 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s2"));
Assert.Equal("0.123 C/m³", new ElectricChargeDensity(0.123456, ElectricChargeDensityUnit.CoulombPerCubicMeter).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricChargeDensity.FromCoulombsPerCubicMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs
index 1140295d07..ff3b204d3a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricChargeTestsBase.g.cs
@@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 A-h", new ElectricCharge(1, ElectricChargeUnit.AmpereHour).ToString());
Assert.Equal("1 C", new ElectricCharge(1, ElectricChargeUnit.Coulomb).ToString());
@@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s1"));
Assert.Equal("0.12 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s2"));
Assert.Equal("0.123 C", new ElectricCharge(0.123456, ElectricChargeUnit.Coulomb).ToString("s3"));
@@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricCharge.FromCoulombs(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs
index 56cdd7c9a9..3a7e1e06bf 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductanceTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 µS", new ElectricConductance(1, ElectricConductanceUnit.Microsiemens).ToString());
Assert.Equal("1 mS", new ElectricConductance(1, ElectricConductanceUnit.Millisiemens).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s1"));
Assert.Equal("0.12 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s2"));
Assert.Equal("0.123 S", new ElectricConductance(0.123456, ElectricConductanceUnit.Siemens).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricConductance.FromSiemens(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs
index c7971356b1..db59e86483 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricConductivityTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 S/ft", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerFoot).ToString());
Assert.Equal("1 S/in", new ElectricConductivity(1, ElectricConductivityUnit.SiemensPerInch).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s1"));
Assert.Equal("0.12 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s2"));
Assert.Equal("0.123 S/m", new ElectricConductivity(0.123456, ElectricConductivityUnit.SiemensPerMeter).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricConductivity.FromSiemensPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs
index 8f1fccadfa..408373cacb 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentDensityTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 A/ft²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareFoot).ToString());
Assert.Equal("1 A/in²", new ElectricCurrentDensity(1, ElectricCurrentDensityUnit.AmperePerSquareInch).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s1"));
Assert.Equal("0.12 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s2"));
Assert.Equal("0.123 A/m²", new ElectricCurrentDensity(0.123456, ElectricCurrentDensityUnit.AmperePerSquareMeter).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricCurrentDensity.FromAmperesPerSquareMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs
index 251f13af39..4a0a019201 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentGradientTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 A/μs", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerMicrosecond).ToString());
Assert.Equal("1 A/ms", new ElectricCurrentGradient(1, ElectricCurrentGradientUnit.AmperePerMillisecond).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s1"));
Assert.Equal("0.12 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s2"));
Assert.Equal("0.123 A/s", new ElectricCurrentGradient(0.123456, ElectricCurrentGradientUnit.AmperePerSecond).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricCurrentGradient.FromAmperesPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs
index 2f7f17d7ea..84a10e1fc3 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricCurrentTestsBase.g.cs
@@ -383,8 +383,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 A", new ElectricCurrent(1, ElectricCurrentUnit.Ampere).ToString());
Assert.Equal("1 cA", new ElectricCurrent(1, ElectricCurrentUnit.Centiampere).ToString());
@@ -397,7 +397,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -420,10 +420,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s1"));
Assert.Equal("0.12 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s2"));
Assert.Equal("0.123 A", new ElectricCurrent(0.123456, ElectricCurrentUnit.Ampere).ToString("s3"));
@@ -431,7 +431,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -461,10 +461,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricCurrent.FromAmperes(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs
index de4a676b29..1c907d731d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricFieldTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 V/m", new ElectricField(1, ElectricFieldUnit.VoltPerMeter).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s1"));
Assert.Equal("0.12 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s2"));
Assert.Equal("0.123 V/m", new ElectricField(0.123456, ElectricFieldUnit.VoltPerMeter).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricField.FromVoltsPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs
index 528ca520a2..a4949c4dcd 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricInductanceTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 H", new ElectricInductance(1, ElectricInductanceUnit.Henry).ToString());
Assert.Equal("1 µH", new ElectricInductance(1, ElectricInductanceUnit.Microhenry).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s1"));
Assert.Equal("0.12 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s2"));
Assert.Equal("0.123 H", new ElectricInductance(0.123456, ElectricInductanceUnit.Henry).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricInductance.FromHenries(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs
index e15c685fa0..9cde8f7717 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialAcTestsBase.g.cs
@@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kVac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.KilovoltAc).ToString());
Assert.Equal("1 MVac", new ElectricPotentialAc(1, ElectricPotentialAcUnit.MegavoltAc).ToString());
@@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s1"));
Assert.Equal("0.12 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s2"));
Assert.Equal("0.123 Vac", new ElectricPotentialAc(0.123456, ElectricPotentialAcUnit.VoltAc).ToString("s3"));
@@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricPotentialAc.FromVoltsAc(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs
index 87b7fe70bb..ca697d9b43 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialChangeRateTestsBase.g.cs
@@ -539,8 +539,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kV/h", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.KilovoltPerHour).ToString());
Assert.Equal("1 kV/μs", new ElectricPotentialChangeRate(1, ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond).ToString());
@@ -565,7 +565,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -600,10 +600,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s1"));
Assert.Equal("0.12 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s2"));
Assert.Equal("0.123 V/s", new ElectricPotentialChangeRate(0.123456, ElectricPotentialChangeRateUnit.VoltPerSecond).ToString("s3"));
@@ -611,7 +611,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -641,10 +641,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricPotentialChangeRate.FromVoltsPerSeconds(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs
index 0d80b8d232..11427db37a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialDcTestsBase.g.cs
@@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kVdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.KilovoltDc).ToString());
Assert.Equal("1 MVdc", new ElectricPotentialDc(1, ElectricPotentialDcUnit.MegavoltDc).ToString());
@@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s1"));
Assert.Equal("0.12 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s2"));
Assert.Equal("0.123 Vdc", new ElectricPotentialDc(0.123456, ElectricPotentialDcUnit.VoltDc).ToString("s3"));
@@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricPotentialDc.FromVoltsDc(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs
index fe849d9823..bdb6a4f024 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricPotentialTestsBase.g.cs
@@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kV", new ElectricPotential(1, ElectricPotentialUnit.Kilovolt).ToString());
Assert.Equal("1 MV", new ElectricPotential(1, ElectricPotentialUnit.Megavolt).ToString());
@@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s1"));
Assert.Equal("0.12 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s2"));
Assert.Equal("0.123 V", new ElectricPotential(0.123456, ElectricPotentialUnit.Volt).ToString("s3"));
@@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricPotential.FromVolts(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs
index e8300e92ec..84e501a996 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistanceTestsBase.g.cs
@@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 GΩ", new ElectricResistance(1, ElectricResistanceUnit.Gigaohm).ToString());
Assert.Equal("1 kΩ", new ElectricResistance(1, ElectricResistanceUnit.Kiloohm).ToString());
@@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s1"));
Assert.Equal("0.12 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s2"));
Assert.Equal("0.123 Ω", new ElectricResistance(0.123456, ElectricResistanceUnit.Ohm).ToString("s3"));
@@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricResistance.FromOhms(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs
index ef08e81da7..5321cf1baf 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs
@@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kΩ·cm", new ElectricResistivity(1, ElectricResistivityUnit.KiloohmCentimeter).ToString());
Assert.Equal("1 kΩ·m", new ElectricResistivity(1, ElectricResistivityUnit.KiloohmMeter).ToString());
@@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s1"));
Assert.Equal("0.12 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s2"));
Assert.Equal("0.123 Ω·m", new ElectricResistivity(0.123456, ElectricResistivityUnit.OhmMeter).ToString("s3"));
@@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricResistivity.FromOhmMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs
index 2159a541b3..ea39314e0f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricSurfaceChargeDensityTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 C/cm²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter).ToString());
Assert.Equal("1 C/in²", new ElectricSurfaceChargeDensity(1, ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s1"));
Assert.Equal("0.12 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s2"));
Assert.Equal("0.123 C/m²", new ElectricSurfaceChargeDensity(0.123456, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ElectricSurfaceChargeDensity.FromCoulombsPerSquareMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs
index d446a0a1da..38e9640a94 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EnergyTestsBase.g.cs
@@ -747,8 +747,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 BTU", new Energy(1, EnergyUnit.BritishThermalUnit).ToString());
Assert.Equal("1 cal", new Energy(1, EnergyUnit.Calorie).ToString());
@@ -789,7 +789,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -840,10 +840,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s1"));
Assert.Equal("0.12 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s2"));
Assert.Equal("0.123 J", new Energy(0.123456, EnergyUnit.Joule).ToString("s3"));
@@ -851,7 +851,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -881,10 +881,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Energy.FromJoules(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs
index 487b4e943e..711284e90e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs
@@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cal/K", new Entropy(1, EntropyUnit.CaloriePerKelvin).ToString());
Assert.Equal("1 J/C", new Entropy(1, EntropyUnit.JoulePerDegreeCelsius).ToString());
@@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s1"));
Assert.Equal("0.12 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s2"));
Assert.Equal("0.123 J/K", new Entropy(0.123456, EntropyUnit.JoulePerKelvin).ToString("s3"));
@@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Entropy.FromJoulesPerKelvin(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs
index a43c2272b7..faa6b8341b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs
@@ -474,8 +474,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cN/s", new ForceChangeRate(1, ForceChangeRateUnit.CentinewtonPerSecond).ToString());
Assert.Equal("1 daN/min", new ForceChangeRate(1, ForceChangeRateUnit.DecanewtonPerMinute).ToString());
@@ -495,7 +495,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -525,10 +525,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s1"));
Assert.Equal("0.12 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s2"));
Assert.Equal("0.123 N/s", new ForceChangeRate(0.123456, ForceChangeRateUnit.NewtonPerSecond).ToString("s3"));
@@ -536,7 +536,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -566,10 +566,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ForceChangeRate.FromNewtonsPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs
index c7358a7082..5875bb78d2 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForcePerLengthTestsBase.g.cs
@@ -773,8 +773,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cN/cm", new ForcePerLength(1, ForcePerLengthUnit.CentinewtonPerCentimeter).ToString());
Assert.Equal("1 cN/m", new ForcePerLength(1, ForcePerLengthUnit.CentinewtonPerMeter).ToString());
@@ -817,7 +817,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -870,10 +870,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s1"));
Assert.Equal("0.12 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s2"));
Assert.Equal("0.123 N/m", new ForcePerLength(0.123456, ForcePerLengthUnit.NewtonPerMeter).ToString("s3"));
@@ -881,7 +881,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -911,10 +911,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ForcePerLength.FromNewtonsPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs
index b3c6d10044..9dfd20416f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ForceTestsBase.g.cs
@@ -474,8 +474,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 daN", new Force(1, ForceUnit.Decanewton).ToString());
Assert.Equal("1 dyn", new Force(1, ForceUnit.Dyn).ToString());
@@ -495,7 +495,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -525,10 +525,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N", new Force(0.123456, ForceUnit.Newton).ToString("s1"));
Assert.Equal("0.12 N", new Force(0.123456, ForceUnit.Newton).ToString("s2"));
Assert.Equal("0.123 N", new Force(0.123456, ForceUnit.Newton).ToString("s3"));
@@ -536,7 +536,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -566,10 +566,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Force.FromNewtons(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs
index a8dfbe8022..af81a2acd5 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FrequencyTestsBase.g.cs
@@ -422,8 +422,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 bpm", new Frequency(1, FrequencyUnit.BeatPerMinute).ToString());
Assert.Equal("1 B Units", new Frequency(1, FrequencyUnit.BUnit).ToString());
@@ -439,7 +439,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -465,10 +465,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s1"));
Assert.Equal("0.12 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s2"));
Assert.Equal("0.123 Hz", new Frequency(0.123456, FrequencyUnit.Hertz).ToString("s3"));
@@ -476,7 +476,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -506,10 +506,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Frequency.FromHertz(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs
index 6e63eb304b..468bfc0dcf 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/FuelEfficiencyTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 km/L", new FuelEfficiency(1, FuelEfficiencyUnit.KilometerPerLiter).ToString());
Assert.Equal("1 L/100km", new FuelEfficiency(1, FuelEfficiencyUnit.LiterPer100Kilometers).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s1"));
Assert.Equal("0.12 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s2"));
Assert.Equal("0.123 L/100km", new FuelEfficiency(0.123456, FuelEfficiencyUnit.LiterPer100Kilometers).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = FuelEfficiency.FromLitersPer100Kilometers(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs
index 01a87cb0d8..71d0062f6e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs
@@ -513,8 +513,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 BTU/h·ft²", new HeatFlux(1, HeatFluxUnit.BtuPerHourSquareFoot).ToString());
Assert.Equal("1 BTU/min·ft²", new HeatFlux(1, HeatFluxUnit.BtuPerMinuteSquareFoot).ToString());
@@ -537,7 +537,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -570,10 +570,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s1"));
Assert.Equal("0.12 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s2"));
Assert.Equal("0.123 W/m²", new HeatFlux(0.123456, HeatFluxUnit.WattPerSquareMeter).ToString("s3"));
@@ -581,7 +581,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -611,10 +611,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = HeatFlux.FromWattsPerSquareMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs
index ac1120c94c..a891c07e90 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/HeatTransferCoefficientTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 Btu/ft²·hr·°F", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit).ToString());
Assert.Equal("1 W/m²·°C", new HeatTransferCoefficient(1, HeatTransferCoefficientUnit.WattPerSquareMeterCelsius).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s1"));
Assert.Equal("0.12 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s2"));
Assert.Equal("0.123 W/m²·K", new HeatTransferCoefficient(0.123456, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = HeatTransferCoefficient.FromWattsPerSquareMeterKelvin(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs
index b663e98a58..e0ccfe7254 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IlluminanceTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 klx", new Illuminance(1, IlluminanceUnit.Kilolux).ToString());
Assert.Equal("1 lx", new Illuminance(1, IlluminanceUnit.Lux).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s1"));
Assert.Equal("0.12 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s2"));
Assert.Equal("0.123 lx", new Illuminance(0.123456, IlluminanceUnit.Lux).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Illuminance.FromLux(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs
index e27dc816ea..1733094f88 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs
@@ -592,8 +592,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 b", new Information(1, InformationUnit.Bit).ToString());
Assert.Equal("1 B", new Information(1, InformationUnit.Byte).ToString());
@@ -624,7 +624,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -665,10 +665,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 b", new Information(0.123456m, InformationUnit.Bit).ToString("s1"));
Assert.Equal("0.12 b", new Information(0.123456m, InformationUnit.Bit).ToString("s2"));
Assert.Equal("0.123 b", new Information(0.123456m, InformationUnit.Bit).ToString("s3"));
@@ -676,7 +676,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -706,10 +706,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Information.FromBits(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs
index 69795c7d5a..707f9f85cc 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs
@@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kW/cm²", new Irradiance(1, IrradianceUnit.KilowattPerSquareCentimeter).ToString());
Assert.Equal("1 kW/m²", new Irradiance(1, IrradianceUnit.KilowattPerSquareMeter).ToString());
@@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s1"));
Assert.Equal("0.12 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s2"));
Assert.Equal("0.123 W/m²", new Irradiance(0.123456, IrradianceUnit.WattPerSquareMeter).ToString("s3"));
@@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Irradiance.FromWattsPerSquareMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs
index deb5995971..5023608e99 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs
@@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 J/cm²", new Irradiation(1, IrradiationUnit.JoulePerSquareCentimeter).ToString());
Assert.Equal("1 J/m²", new Irradiation(1, IrradiationUnit.JoulePerSquareMeter).ToString());
@@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s1"));
Assert.Equal("0.12 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s2"));
Assert.Equal("0.123 J/m²", new Irradiation(0.123456, IrradiationUnit.JoulePerSquareMeter).ToString("s3"));
@@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Irradiation.FromJoulesPerSquareMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs
index 2d34f909bc..9c5d16b941 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/KinematicViscosityTestsBase.g.cs
@@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cSt", new KinematicViscosity(1, KinematicViscosityUnit.Centistokes).ToString());
Assert.Equal("1 dSt", new KinematicViscosity(1, KinematicViscosityUnit.Decistokes).ToString());
@@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s1"));
Assert.Equal("0.12 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s2"));
Assert.Equal("0.123 m²/s", new KinematicViscosity(0.123456, KinematicViscosityUnit.SquareMeterPerSecond).ToString("s3"));
@@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = KinematicViscosity.FromSquareMetersPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs
index 50d3ee9d03..0547485dd6 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LapseRateTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 ∆°C/km", new LapseRate(1, LapseRateUnit.DegreeCelsiusPerKilometer).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 ∆°C/km", new LapseRate(0.123456, LapseRateUnit.DegreeCelsiusPerKilometer).ToString("s1"));
Assert.Equal("0.12 ∆°C/km", new LapseRate(0.123456, LapseRateUnit.DegreeCelsiusPerKilometer).ToString("s2"));
Assert.Equal("0.123 ∆°C/km", new LapseRate(0.123456, LapseRateUnit.DegreeCelsiusPerKilometer).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = LapseRate.FromDegreesCelciusPerKilometer(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs
index 27a14e0e69..70be45e183 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs
@@ -708,8 +708,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 au", new Length(1, LengthUnit.AstronomicalUnit).ToString());
Assert.Equal("1 cm", new Length(1, LengthUnit.Centimeter).ToString());
@@ -747,7 +747,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -795,10 +795,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m", new Length(0.123456, LengthUnit.Meter).ToString("s1"));
Assert.Equal("0.12 m", new Length(0.123456, LengthUnit.Meter).ToString("s2"));
Assert.Equal("0.123 m", new Length(0.123456, LengthUnit.Meter).ToString("s3"));
@@ -806,7 +806,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -836,10 +836,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Length.FromMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs
index ad671cfe25..9e8fc5c024 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LevelTestsBase.g.cs
@@ -309,15 +309,15 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 dB", new Level(1, LevelUnit.Decibel).ToString());
Assert.Equal("1 Np", new Level(1, LevelUnit.Neper).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -334,10 +334,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s1"));
Assert.Equal("0.12 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s2"));
Assert.Equal("0.123 dB", new Level(0.123456, LevelUnit.Decibel).ToString("s3"));
@@ -345,7 +345,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Level.FromDecibels(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs
index ba441f0104..c1bc525fe3 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearDensityTestsBase.g.cs
@@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 g/cm", new LinearDensity(1, LinearDensityUnit.GramPerCentimeter).ToString());
Assert.Equal("1 g/m", new LinearDensity(1, LinearDensityUnit.GramPerMeter).ToString());
@@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s1"));
Assert.Equal("0.12 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s2"));
Assert.Equal("0.123 kg/m", new LinearDensity(0.123456, LinearDensityUnit.KilogramPerMeter).ToString("s3"));
@@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = LinearDensity.FromKilogramsPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs
index 0e7b07daef..19170d5fbb 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LinearPowerDensityTestsBase.g.cs
@@ -604,8 +604,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 GW/cm", new LinearPowerDensity(1, LinearPowerDensityUnit.GigawattPerCentimeter).ToString());
Assert.Equal("1 GW/ft", new LinearPowerDensity(1, LinearPowerDensityUnit.GigawattPerFoot).ToString());
@@ -635,7 +635,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -675,10 +675,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s1"));
Assert.Equal("0.12 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s2"));
Assert.Equal("0.123 W/m", new LinearPowerDensity(0.123456, LinearPowerDensityUnit.WattPerMeter).ToString("s3"));
@@ -686,7 +686,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -716,10 +716,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = LinearPowerDensity.FromWattsPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs
index 731253227a..54fbec51ae 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminosityTestsBase.g.cs
@@ -461,8 +461,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 daW", new Luminosity(1, LuminosityUnit.Decawatt).ToString());
Assert.Equal("1 dW", new Luminosity(1, LuminosityUnit.Deciwatt).ToString());
@@ -481,7 +481,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -510,10 +510,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s1"));
Assert.Equal("0.12 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s2"));
Assert.Equal("0.123 W", new Luminosity(0.123456, LuminosityUnit.Watt).ToString("s3"));
@@ -521,7 +521,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -551,10 +551,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Luminosity.FromWatts(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs
index 5ebb12ec7a..1a74dec784 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousFluxTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 lm", new LuminousFlux(1, LuminousFluxUnit.Lumen).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s1"));
Assert.Equal("0.12 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s2"));
Assert.Equal("0.123 lm", new LuminousFlux(0.123456, LuminousFluxUnit.Lumen).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = LuminousFlux.FromLumens(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs
index e13f70b337..da9f2c8f4e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/LuminousIntensityTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cd", new LuminousIntensity(1, LuminousIntensityUnit.Candela).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s1"));
Assert.Equal("0.12 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s2"));
Assert.Equal("0.123 cd", new LuminousIntensity(0.123456, LuminousIntensityUnit.Candela).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = LuminousIntensity.FromCandela(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs
index 55ceca0294..16ed475c5d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFieldTestsBase.g.cs
@@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 G", new MagneticField(1, MagneticFieldUnit.Gauss).ToString());
Assert.Equal("1 µT", new MagneticField(1, MagneticFieldUnit.Microtesla).ToString());
@@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s1"));
Assert.Equal("0.12 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s2"));
Assert.Equal("0.123 T", new MagneticField(0.123456, MagneticFieldUnit.Tesla).ToString("s3"));
@@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MagneticField.FromTeslas(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs
index 767693890e..ec8ddfb7e7 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagneticFluxTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 Wb", new MagneticFlux(1, MagneticFluxUnit.Weber).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s1"));
Assert.Equal("0.12 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s2"));
Assert.Equal("0.123 Wb", new MagneticFlux(0.123456, MagneticFluxUnit.Weber).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MagneticFlux.FromWebers(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs
index d2a4e6b2ba..b26a15e9ac 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MagnetizationTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 A/m", new Magnetization(1, MagnetizationUnit.AmperePerMeter).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s1"));
Assert.Equal("0.12 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s2"));
Assert.Equal("0.123 A/m", new Magnetization(0.123456, MagnetizationUnit.AmperePerMeter).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Magnetization.FromAmperesPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs
index 4dc30fca0a..aae29e2b4f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs
@@ -916,8 +916,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cg/dL", new MassConcentration(1, MassConcentrationUnit.CentigramPerDeciliter).ToString());
Assert.Equal("1 cg/L", new MassConcentration(1, MassConcentrationUnit.CentigramPerLiter).ToString());
@@ -971,7 +971,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -1035,10 +1035,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s1"));
Assert.Equal("0.12 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s2"));
Assert.Equal("0.123 kg/m³", new MassConcentration(0.123456, MassConcentrationUnit.KilogramPerCubicMeter).ToString("s3"));
@@ -1046,7 +1046,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -1076,10 +1076,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MassConcentration.FromKilogramsPerCubicMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs
index a50c205acd..5525ce02f4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs
@@ -708,8 +708,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cg/d", new MassFlow(1, MassFlowUnit.CentigramPerDay).ToString());
Assert.Equal("1 cg/s", new MassFlow(1, MassFlowUnit.CentigramPerSecond).ToString());
@@ -747,7 +747,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -795,10 +795,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s1"));
Assert.Equal("0.12 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s2"));
Assert.Equal("0.123 g/s", new MassFlow(0.123456, MassFlowUnit.GramPerSecond).ToString("s3"));
@@ -806,7 +806,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -836,10 +836,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MassFlow.FromGramsPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs
index 9b1dc96b6a..c714d53afe 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFluxTestsBase.g.cs
@@ -435,8 +435,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 g·h⁻¹·cm⁻²", new MassFlux(1, MassFluxUnit.GramPerHourPerSquareCentimeter).ToString());
Assert.Equal("1 g·h⁻¹·m⁻²", new MassFlux(1, MassFluxUnit.GramPerHourPerSquareMeter).ToString());
@@ -453,7 +453,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -480,10 +480,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s1"));
Assert.Equal("0.12 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s2"));
Assert.Equal("0.123 kg·s⁻¹·m⁻²", new MassFlux(0.123456, MassFluxUnit.KilogramPerSecondPerSquareMeter).ToString("s3"));
@@ -491,7 +491,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -521,10 +521,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MassFlux.FromKilogramsPerSecondPerSquareMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs
index 42eeed544a..a55be4828b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs
@@ -591,8 +591,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cg/g", new MassFraction(1, MassFractionUnit.CentigramPerGram).ToString());
Assert.Equal("1 cg/kg", new MassFraction(1, MassFractionUnit.CentigramPerKilogram).ToString());
@@ -621,7 +621,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -660,10 +660,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s1"));
Assert.Equal("0.12", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s2"));
Assert.Equal("0.123", new MassFraction(0.123456, MassFractionUnit.DecimalFraction).ToString("s3"));
@@ -671,7 +671,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -701,10 +701,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MassFraction.FromDecimalFractions(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs
index 14adde23fc..46c9980368 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs
@@ -643,8 +643,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 g·cm²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.GramSquareCentimeter).ToString());
Assert.Equal("1 g·dm²", new MassMomentOfInertia(1, MassMomentOfInertiaUnit.GramSquareDecimeter).ToString());
@@ -677,7 +677,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -720,10 +720,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s1"));
Assert.Equal("0.12 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s2"));
Assert.Equal("0.123 kg·m²", new MassMomentOfInertia(0.123456, MassMomentOfInertiaUnit.KilogramSquareMeter).ToString("s3"));
@@ -731,7 +731,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -761,10 +761,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MassMomentOfInertia.FromKilogramSquareMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs
index 4b4a911cc9..7733cb647a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs
@@ -604,8 +604,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cg", new Mass(1, MassUnit.Centigram).ToString());
Assert.Equal("1 dag", new Mass(1, MassUnit.Decagram).ToString());
@@ -635,7 +635,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -675,10 +675,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s1"));
Assert.Equal("0.12 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s2"));
Assert.Equal("0.123 kg", new Mass(0.123456, MassUnit.Kilogram).ToString("s3"));
@@ -686,7 +686,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -716,10 +716,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Mass.FromKilograms(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs
index 7449e96ab6..17dc5979f9 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEnergyTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 J/mol", new MolarEnergy(1, MolarEnergyUnit.JoulePerMole).ToString());
Assert.Equal("1 kJ/mol", new MolarEnergy(1, MolarEnergyUnit.KilojoulePerMole).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s1"));
Assert.Equal("0.12 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s2"));
Assert.Equal("0.123 J/mol", new MolarEnergy(0.123456, MolarEnergyUnit.JoulePerMole).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MolarEnergy.FromJoulesPerMole(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs
index 060f90e168..8c8850d5be 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 J/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.JoulePerMoleKelvin).ToString());
Assert.Equal("1 kJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s1"));
Assert.Equal("0.12 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s2"));
Assert.Equal("0.123 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MolarEntropy.FromJoulesPerMoleKelvin(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs
index 2383f5f79d..eb7c97bb69 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs
@@ -435,8 +435,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cg/mol", new MolarMass(1, MolarMassUnit.CentigramPerMole).ToString());
Assert.Equal("1 dag/mol", new MolarMass(1, MolarMassUnit.DecagramPerMole).ToString());
@@ -453,7 +453,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -480,10 +480,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s1"));
Assert.Equal("0.12 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s2"));
Assert.Equal("0.123 kg/mol", new MolarMass(0.123456, MolarMassUnit.KilogramPerMole).ToString("s3"));
@@ -491,7 +491,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -521,10 +521,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = MolarMass.FromKilogramsPerMole(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs
index 8ac39b8759..152f62104c 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarityTestsBase.g.cs
@@ -383,8 +383,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cmol/L", new Molarity(1, MolarityUnit.CentimolesPerLiter).ToString());
Assert.Equal("1 dmol/L", new Molarity(1, MolarityUnit.DecimolesPerLiter).ToString());
@@ -397,7 +397,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -420,10 +420,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 mol/m³", new Molarity(0.123456, MolarityUnit.MolesPerCubicMeter).ToString("s1"));
Assert.Equal("0.12 mol/m³", new Molarity(0.123456, MolarityUnit.MolesPerCubicMeter).ToString("s2"));
Assert.Equal("0.123 mol/m³", new Molarity(0.123456, MolarityUnit.MolesPerCubicMeter).ToString("s3"));
@@ -431,7 +431,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -461,10 +461,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Molarity.FromMolesPerCubicMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs
index 513bc00bfd..731cadc6a0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermeabilityTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 H/m", new Permeability(1, PermeabilityUnit.HenryPerMeter).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s1"));
Assert.Equal("0.12 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s2"));
Assert.Equal("0.123 H/m", new Permeability(0.123456, PermeabilityUnit.HenryPerMeter).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Permeability.FromHenriesPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs
index b07e39312a..5f2bea4f41 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PermittivityTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 F/m", new Permittivity(1, PermittivityUnit.FaradPerMeter).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s1"));
Assert.Equal("0.12 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s2"));
Assert.Equal("0.123 F/m", new Permittivity(0.123456, PermittivityUnit.FaradPerMeter).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Permittivity.FromFaradsPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs
index f287889fe5..46503289e2 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs
@@ -851,8 +851,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 daW/ft³", new PowerDensity(1, PowerDensityUnit.DecawattPerCubicFoot).ToString());
Assert.Equal("1 daW/in³", new PowerDensity(1, PowerDensityUnit.DecawattPerCubicInch).ToString());
@@ -901,7 +901,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -960,10 +960,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s1"));
Assert.Equal("0.12 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s2"));
Assert.Equal("0.123 W/m³", new PowerDensity(0.123456, PowerDensityUnit.WattPerCubicMeter).ToString("s3"));
@@ -971,7 +971,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -1001,10 +1001,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = PowerDensity.FromWattsPerCubicMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs
index a9daee8c66..f7817f52b6 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerRatioTestsBase.g.cs
@@ -309,15 +309,15 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 dBmW", new PowerRatio(1, PowerRatioUnit.DecibelMilliwatt).ToString());
Assert.Equal("1 dBW", new PowerRatio(1, PowerRatioUnit.DecibelWatt).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -334,10 +334,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s1"));
Assert.Equal("0.12 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s2"));
Assert.Equal("0.123 dBW", new PowerRatio(0.123456, PowerRatioUnit.DecibelWatt).ToString("s3"));
@@ -345,7 +345,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = PowerRatio.FromDecibelWatts(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs
index e75b82c7ae..22cd9e08f6 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PowerTestsBase.g.cs
@@ -579,8 +579,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 hp(S)", new Power(1, PowerUnit.BoilerHorsepower).ToString());
Assert.Equal("1 Btu/h", new Power(1, PowerUnit.BritishThermalUnitPerHour).ToString());
@@ -610,7 +610,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -650,10 +650,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W", new Power(0.123456m, PowerUnit.Watt).ToString("s1"));
Assert.Equal("0.12 W", new Power(0.123456m, PowerUnit.Watt).ToString("s2"));
Assert.Equal("0.123 W", new Power(0.123456m, PowerUnit.Watt).ToString("s3"));
@@ -661,7 +661,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -691,10 +691,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Power.FromWatts(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs
index b5659483e4..87ea64ef9f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureChangeRateTestsBase.g.cs
@@ -448,8 +448,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 atm/s", new PressureChangeRate(1, PressureChangeRateUnit.AtmospherePerSecond).ToString());
Assert.Equal("1 kPa/min", new PressureChangeRate(1, PressureChangeRateUnit.KilopascalPerMinute).ToString());
@@ -467,7 +467,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -495,10 +495,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s1"));
Assert.Equal("0.12 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s2"));
Assert.Equal("0.123 Pa/s", new PressureChangeRate(0.123456, PressureChangeRateUnit.PascalPerSecond).ToString("s3"));
@@ -506,7 +506,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -536,10 +536,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = PressureChangeRate.FromPascalsPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs
index eeccb43baa..cc7d8b733e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs
@@ -851,8 +851,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 atm", new Pressure(1, PressureUnit.Atmosphere).ToString());
Assert.Equal("1 bar", new Pressure(1, PressureUnit.Bar).ToString());
@@ -901,7 +901,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -960,10 +960,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s1"));
Assert.Equal("0.12 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s2"));
Assert.Equal("0.123 Pa", new Pressure(0.123456, PressureUnit.Pascal).ToString("s3"));
@@ -971,7 +971,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -1001,10 +1001,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Pressure.FromPascals(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs
index 51b803091f..e5a8d75f97 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioChangeRateTestsBase.g.cs
@@ -305,15 +305,15 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 /s", new RatioChangeRate(1, RatioChangeRateUnit.DecimalFractionPerSecond).ToString());
Assert.Equal("1 %/s", new RatioChangeRate(1, RatioChangeRateUnit.PercentPerSecond).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -330,10 +330,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s1"));
Assert.Equal("0.12 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s2"));
Assert.Equal("0.123 /s", new RatioChangeRate(0.123456, RatioChangeRateUnit.DecimalFractionPerSecond).ToString("s3"));
@@ -341,7 +341,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -371,10 +371,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = RatioChangeRate.FromDecimalFractionsPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs
index 8a0ffaaa7e..84c33e88b5 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RatioTestsBase.g.cs
@@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1", new Ratio(1, RatioUnit.DecimalFraction).ToString());
Assert.Equal("1 ppb", new Ratio(1, RatioUnit.PartPerBillion).ToString());
@@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s1"));
Assert.Equal("0.12", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s2"));
Assert.Equal("0.123", new Ratio(0.123456, RatioUnit.DecimalFraction).ToString("s3"));
@@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Ratio.FromDecimalFractions(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs
index 98371bc5bc..94b91dfae0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactiveEnergyTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kvarh", new ReactiveEnergy(1, ReactiveEnergyUnit.KilovoltampereReactiveHour).ToString());
Assert.Equal("1 Mvarh", new ReactiveEnergy(1, ReactiveEnergyUnit.MegavoltampereReactiveHour).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s1"));
Assert.Equal("0.12 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s2"));
Assert.Equal("0.123 varh", new ReactiveEnergy(0.123456, ReactiveEnergyUnit.VoltampereReactiveHour).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ReactiveEnergy.FromVoltampereReactiveHours(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs
index a1f09b13a8..5464222e57 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReactivePowerTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 Gvar", new ReactivePower(1, ReactivePowerUnit.GigavoltampereReactive).ToString());
Assert.Equal("1 kvar", new ReactivePower(1, ReactivePowerUnit.KilovoltampereReactive).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s1"));
Assert.Equal("0.12 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s2"));
Assert.Equal("0.123 var", new ReactivePower(0.123456, ReactivePowerUnit.VoltampereReactive).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ReactivePower.FromVoltamperesReactive(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs
index 8dc57c85ad..0fabdbb37f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalAreaTestsBase.g.cs
@@ -422,8 +422,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cm⁻²", new ReciprocalArea(1, ReciprocalAreaUnit.InverseSquareCentimeter).ToString());
Assert.Equal("1 dm⁻²", new ReciprocalArea(1, ReciprocalAreaUnit.InverseSquareDecimeter).ToString());
@@ -439,7 +439,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -465,10 +465,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s1"));
Assert.Equal("0.12 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s2"));
Assert.Equal("0.123 m⁻²", new ReciprocalArea(0.123456, ReciprocalAreaUnit.InverseSquareMeter).ToString("s3"));
@@ -476,7 +476,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -506,10 +506,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ReciprocalArea.FromInverseSquareMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs
index 3404678d35..62b9b78790 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ReciprocalLengthTestsBase.g.cs
@@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cm⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseCentimeter).ToString());
Assert.Equal("1 ft⁻¹", new ReciprocalLength(1, ReciprocalLengthUnit.InverseFoot).ToString());
@@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s1"));
Assert.Equal("0.12 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s2"));
Assert.Equal("0.123 m⁻¹", new ReciprocalLength(0.123456, ReciprocalLengthUnit.InverseMeter).ToString("s3"));
@@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ReciprocalLength.FromInverseMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs
index 94a6fb0f62..8a12a4c70d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RelativeHumidityTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 %RH", new RelativeHumidity(1, RelativeHumidityUnit.Percent).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s1"));
Assert.Equal("0.12 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s2"));
Assert.Equal("0.123 %RH", new RelativeHumidity(0.123456, RelativeHumidityUnit.Percent).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = RelativeHumidity.FromPercent(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs
index be96d05c8e..fb226a255b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalAccelerationTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 °/s²", new RotationalAcceleration(1, RotationalAccelerationUnit.DegreePerSecondSquared).ToString());
Assert.Equal("1 rad/s²", new RotationalAcceleration(1, RotationalAccelerationUnit.RadianPerSecondSquared).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s1"));
Assert.Equal("0.12 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s2"));
Assert.Equal("0.123 rad/s²", new RotationalAcceleration(0.123456, RotationalAccelerationUnit.RadianPerSecondSquared).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = RotationalAcceleration.FromRadiansPerSecondSquared(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs
index 08157997fb..84c1bd4e8b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs
@@ -448,8 +448,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 crad/s", new RotationalSpeed(1, RotationalSpeedUnit.CentiradianPerSecond).ToString());
Assert.Equal("1 drad/s", new RotationalSpeed(1, RotationalSpeedUnit.DeciradianPerSecond).ToString());
@@ -467,7 +467,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -495,10 +495,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s1"));
Assert.Equal("0.12 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s2"));
Assert.Equal("0.123 rad/s", new RotationalSpeed(0.123456, RotationalSpeedUnit.RadianPerSecond).ToString("s3"));
@@ -506,7 +506,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -536,10 +536,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = RotationalSpeed.FromRadiansPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs
index b6b830f860..35e7db379d 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessPerLengthTestsBase.g.cs
@@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kN·m/rad/m", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter).ToString());
Assert.Equal("1 kipf·ft/°/ft", new RotationalStiffnessPerLength(1, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot).ToString());
@@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s1"));
Assert.Equal("0.12 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s2"));
Assert.Equal("0.123 N·m/rad/m", new RotationalStiffnessPerLength(0.123456, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter).ToString("s3"));
@@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs
index e52a0856f6..912e63f77e 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RotationalStiffnessTestsBase.g.cs
@@ -708,8 +708,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cN·m/deg", new RotationalStiffness(1, RotationalStiffnessUnit.CentinewtonMeterPerDegree).ToString());
Assert.Equal("1 cN·mm/deg", new RotationalStiffness(1, RotationalStiffnessUnit.CentinewtonMillimeterPerDegree).ToString());
@@ -747,7 +747,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -795,10 +795,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s1"));
Assert.Equal("0.12 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s2"));
Assert.Equal("0.123 N·m/rad", new RotationalStiffness(0.123456, RotationalStiffnessUnit.NewtonMeterPerRadian).ToString("s3"));
@@ -806,7 +806,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -836,10 +836,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = RotationalStiffness.FromNewtonMetersPerRadian(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs
index 6f672bdfbc..bf9ba33eeb 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ScalarTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1", new Scalar(1, ScalarUnit.Amount).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1", new Scalar(0.123456, ScalarUnit.Amount).ToString("s1"));
Assert.Equal("0.12", new Scalar(0.123456, ScalarUnit.Amount).ToString("s2"));
Assert.Equal("0.123", new Scalar(0.123456, ScalarUnit.Amount).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Scalar.FromAmount(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs
index 41addc5b3c..b65e7b2a4f 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SolidAngleTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 sr", new SolidAngle(1, SolidAngleUnit.Steradian).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s1"));
Assert.Equal("0.12 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s2"));
Assert.Equal("0.123 sr", new SolidAngle(0.123456, SolidAngleUnit.Steradian).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = SolidAngle.FromSteradians(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs
index 90b0f09844..9a0e0d5f05 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEnergyTestsBase.g.cs
@@ -604,8 +604,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 btu/lb", new SpecificEnergy(1, SpecificEnergyUnit.BtuPerPound).ToString());
Assert.Equal("1 cal/g", new SpecificEnergy(1, SpecificEnergyUnit.CaloriePerGram).ToString());
@@ -635,7 +635,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -675,10 +675,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s1"));
Assert.Equal("0.12 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s2"));
Assert.Equal("0.123 J/kg", new SpecificEnergy(0.123456, SpecificEnergyUnit.JoulePerKilogram).ToString("s3"));
@@ -686,7 +686,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -716,10 +716,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = SpecificEnergy.FromJoulesPerKilogram(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs
index a7f4d8dbfb..65481090e4 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs
@@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 BTU/lb·°F", new SpecificEntropy(1, SpecificEntropyUnit.BtuPerPoundFahrenheit).ToString());
Assert.Equal("1 cal/g.K", new SpecificEntropy(1, SpecificEntropyUnit.CaloriePerGramKelvin).ToString());
@@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s1"));
Assert.Equal("0.12 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s2"));
Assert.Equal("0.123 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3"));
@@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = SpecificEntropy.FromJoulesPerKilogramKelvin(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs
index a18827b0e1..466865ad45 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs
@@ -331,8 +331,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 g/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString());
Assert.Equal("1 kg/(kgf�h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour).ToString());
@@ -341,7 +341,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -360,10 +360,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s1"));
Assert.Equal("0.12 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s2"));
Assert.Equal("0.123 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3"));
@@ -371,7 +371,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -401,10 +401,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = SpecificFuelConsumption.FromGramsPerKiloNewtonSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs
index a1c093c63d..42bb9b2d09 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificVolumeTestsBase.g.cs
@@ -318,8 +318,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 ft³/lb", new SpecificVolume(1, SpecificVolumeUnit.CubicFootPerPound).ToString());
Assert.Equal("1 m³/kg", new SpecificVolume(1, SpecificVolumeUnit.CubicMeterPerKilogram).ToString());
@@ -327,7 +327,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -345,10 +345,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s1"));
Assert.Equal("0.12 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s2"));
Assert.Equal("0.123 m³/kg", new SpecificVolume(0.123456, SpecificVolumeUnit.CubicMeterPerKilogram).ToString("s3"));
@@ -356,7 +356,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -386,10 +386,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = SpecificVolume.FromCubicMetersPerKilogram(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs
index 3999b3ad24..9c54526bfa 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs
@@ -500,8 +500,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kgf/cm³", new SpecificWeight(1, SpecificWeightUnit.KilogramForcePerCubicCentimeter).ToString());
Assert.Equal("1 kgf/m³", new SpecificWeight(1, SpecificWeightUnit.KilogramForcePerCubicMeter).ToString());
@@ -523,7 +523,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -555,10 +555,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s1"));
Assert.Equal("0.12 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s2"));
Assert.Equal("0.123 N/m³", new SpecificWeight(0.123456, SpecificWeightUnit.NewtonPerCubicMeter).ToString("s3"));
@@ -566,7 +566,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -596,10 +596,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = SpecificWeight.FromNewtonsPerCubicMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs
index fd6f5179ca..badb0e3dfe 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs
@@ -695,8 +695,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cm/h", new Speed(1, SpeedUnit.CentimeterPerHour).ToString());
Assert.Equal("1 cm/min", new Speed(1, SpeedUnit.CentimeterPerMinute).ToString());
@@ -733,7 +733,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -780,10 +780,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s1"));
Assert.Equal("0.12 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s2"));
Assert.Equal("0.123 m/s", new Speed(0.123456, SpeedUnit.MeterPerSecond).ToString("s3"));
@@ -791,7 +791,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -821,10 +821,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Speed.FromMetersPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs
index 59e6bbff3a..3e9dd9ce9a 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/StandardVolumeFlowTestsBase.g.cs
@@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 sccm", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute).ToString());
Assert.Equal("1 scfh", new StandardVolumeFlow(1, StandardVolumeFlowUnit.StandardCubicFootPerHour).ToString());
@@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s1"));
Assert.Equal("0.12 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s2"));
Assert.Equal("0.123 Sm³/s", new StandardVolumeFlow(0.123456, StandardVolumeFlowUnit.StandardCubicMeterPerSecond).ToString("s3"));
@@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = StandardVolumeFlow.FromStandardCubicMetersPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs
index 42ec2fc80f..d0142ec5d0 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs
@@ -409,8 +409,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 c°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond).ToString());
Assert.Equal("1 da°C/s", new TemperatureChangeRate(1, TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond).ToString());
@@ -425,7 +425,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -450,10 +450,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s1"));
Assert.Equal("0.12 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s2"));
Assert.Equal("0.123 °C/s", new TemperatureChangeRate(0.123456, TemperatureChangeRateUnit.DegreeCelsiusPerSecond).ToString("s3"));
@@ -461,7 +461,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -491,10 +491,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = TemperatureChangeRate.FromDegreesCelsiusPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs
index efd558506d..7e727b5d53 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureDeltaTestsBase.g.cs
@@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 ∆°C", new TemperatureDelta(1, TemperatureDeltaUnit.DegreeCelsius).ToString());
Assert.Equal("1 ∆°De", new TemperatureDelta(1, TemperatureDeltaUnit.DegreeDelisle).ToString());
@@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s1"));
Assert.Equal("0.12 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s2"));
Assert.Equal("0.123 ∆K", new TemperatureDelta(0.123456, TemperatureDeltaUnit.Kelvin).ToString("s3"));
@@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = TemperatureDelta.FromKelvins(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs
index f558e9e51e..24c065a159 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureTestsBase.g.cs
@@ -397,8 +397,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 °C", new Temperature(1, TemperatureUnit.DegreeCelsius).ToString());
Assert.Equal("1 °De", new Temperature(1, TemperatureUnit.DegreeDelisle).ToString());
@@ -413,7 +413,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -438,10 +438,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s1"));
Assert.Equal("0.12 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s2"));
Assert.Equal("0.123 K", new Temperature(0.123456, TemperatureUnit.Kelvin).ToString("s3"));
@@ -449,7 +449,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -479,10 +479,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Temperature.FromKelvins(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs
index 4a93dc82d4..c09c444f10 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalConductivityTestsBase.g.cs
@@ -305,15 +305,15 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 BTU/h·ft·°F", new ThermalConductivity(1, ThermalConductivityUnit.BtuPerHourFootFahrenheit).ToString());
Assert.Equal("1 W/m·K", new ThermalConductivity(1, ThermalConductivityUnit.WattPerMeterKelvin).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -330,10 +330,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s1"));
Assert.Equal("0.12 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s2"));
Assert.Equal("0.123 W/m·K", new ThermalConductivity(0.123456, ThermalConductivityUnit.WattPerMeterKelvin).ToString("s3"));
@@ -341,7 +341,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -371,10 +371,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ThermalConductivity.FromWattsPerMeterKelvin(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs
index 37103e822e..f9b088d081 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ThermalResistanceTestsBase.g.cs
@@ -344,8 +344,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 Hrft²°F/Btu", new ThermalResistance(1, ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu).ToString());
Assert.Equal("1 cm²Hr°C/kcal", new ThermalResistance(1, ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie).ToString());
@@ -355,7 +355,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -375,10 +375,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s1"));
Assert.Equal("0.12 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s2"));
Assert.Equal("0.123 m²K/kW", new ThermalResistance(0.123456, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt).ToString("s3"));
@@ -386,7 +386,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -416,10 +416,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = ThermalResistance.FromSquareMeterKelvinsPerKilowatt(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs
index 401ffcbfd7..8201166b49 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorquePerLengthTestsBase.g.cs
@@ -552,8 +552,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kgf·cm/m", new TorquePerLength(1, TorquePerLengthUnit.KilogramForceCentimeterPerMeter).ToString());
Assert.Equal("1 kgf·m/m", new TorquePerLength(1, TorquePerLengthUnit.KilogramForceMeterPerMeter).ToString());
@@ -579,7 +579,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -615,10 +615,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s1"));
Assert.Equal("0.12 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s2"));
Assert.Equal("0.123 N·m/m", new TorquePerLength(0.123456, TorquePerLengthUnit.NewtonMeterPerMeter).ToString("s3"));
@@ -626,7 +626,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -656,10 +656,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = TorquePerLength.FromNewtonMetersPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs
index 45cea4af1c..a6a91a44d8 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs
@@ -565,8 +565,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 kgf·cm", new Torque(1, TorqueUnit.KilogramForceCentimeter).ToString());
Assert.Equal("1 kgf·m", new Torque(1, TorqueUnit.KilogramForceMeter).ToString());
@@ -593,7 +593,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -630,10 +630,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s1"));
Assert.Equal("0.12 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s2"));
Assert.Equal("0.123 N·m", new Torque(0.123456, TorqueUnit.NewtonMeter).ToString("s3"));
@@ -641,7 +641,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -671,10 +671,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Torque.FromNewtonMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs
index 474bbf295d..75b1af7686 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/TurbidityTestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 NTU", new Turbidity(1, TurbidityUnit.NTU).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s1"));
Assert.Equal("0.12 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s2"));
Assert.Equal("0.123 NTU", new Turbidity(0.123456, TurbidityUnit.NTU).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Turbidity.FromNTU(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs
index 2505949dee..032d274ded 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VitaminATestsBase.g.cs
@@ -292,14 +292,14 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 IU", new VitaminA(1, VitaminAUnit.InternationalUnit).ToString());
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -315,10 +315,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s1"));
Assert.Equal("0.12 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s2"));
Assert.Equal("0.123 IU", new VitaminA(0.123456, VitaminAUnit.InternationalUnit).ToString("s3"));
@@ -326,7 +326,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -356,10 +356,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = VitaminA.FromInternationalUnits(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs
index f4025417ea..8b9a1ae06c 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs
@@ -539,8 +539,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cL/L", new VolumeConcentration(1, VolumeConcentrationUnit.CentilitersPerLiter).ToString());
Assert.Equal("1 cL/mL", new VolumeConcentration(1, VolumeConcentrationUnit.CentilitersPerMililiter).ToString());
@@ -565,7 +565,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -600,10 +600,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s1"));
Assert.Equal("0.12", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s2"));
Assert.Equal("0.123", new VolumeConcentration(0.123456, VolumeConcentrationUnit.DecimalFraction).ToString("s3"));
@@ -611,7 +611,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -641,10 +641,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = VolumeConcentration.FromDecimalFractions(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs
index be93743135..9ad6d05ebd 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs
@@ -1007,8 +1007,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 af/d", new VolumeFlow(1, VolumeFlowUnit.AcreFootPerDay).ToString());
Assert.Equal("1 af/h", new VolumeFlow(1, VolumeFlowUnit.AcreFootPerHour).ToString());
@@ -1069,7 +1069,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -1140,10 +1140,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s1"));
Assert.Equal("0.12 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s2"));
Assert.Equal("0.123 m³/s", new VolumeFlow(0.123456, VolumeFlowUnit.CubicMeterPerSecond).ToString("s3"));
@@ -1151,7 +1151,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -1181,10 +1181,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = VolumeFlow.FromCubicMetersPerSecond(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs
index 718c2ecd71..9eff21be27 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumePerLengthTestsBase.g.cs
@@ -370,8 +370,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 m³/m", new VolumePerLength(1, VolumePerLengthUnit.CubicMeterPerMeter).ToString());
Assert.Equal("1 yd³/ft", new VolumePerLength(1, VolumePerLengthUnit.CubicYardPerFoot).ToString());
@@ -383,7 +383,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -405,10 +405,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s1"));
Assert.Equal("0.12 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s2"));
Assert.Equal("0.123 m³/m", new VolumePerLength(0.123456, VolumePerLengthUnit.CubicMeterPerMeter).ToString("s3"));
@@ -416,7 +416,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -446,10 +446,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = VolumePerLength.FromCubicMetersPerMeter(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs
index d2e52c0871..55e7de73ac 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs
@@ -942,8 +942,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 ac-ft", new Volume(1, VolumeUnit.AcreFoot).ToString());
Assert.Equal("1", new Volume(1, VolumeUnit.AuTablespoon).ToString());
@@ -999,7 +999,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -1065,10 +1065,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s1"));
Assert.Equal("0.12 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s2"));
Assert.Equal("0.123 m³", new Volume(0.123456, VolumeUnit.CubicMeter).ToString("s3"));
@@ -1076,7 +1076,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -1106,10 +1106,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = Volume.FromCubicMeters(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs
index 6f391a97dd..6ec9034c39 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/VolumetricHeatCapacityTestsBase.g.cs
@@ -396,8 +396,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 BTU/ft³·°F", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit).ToString());
Assert.Equal("1 cal/cm³·°C", new VolumetricHeatCapacity(1, VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius).ToString());
@@ -411,7 +411,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -435,10 +435,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s1"));
Assert.Equal("0.12 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s2"));
Assert.Equal("0.123 J/m³·K", new VolumetricHeatCapacity(0.123456, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin).ToString("s3"));
@@ -446,7 +446,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -476,10 +476,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = VolumetricHeatCapacity.FromJoulesPerCubicMeterKelvin(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs
index 1dd7d407d5..3fc3a5c095 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs
@@ -357,8 +357,8 @@ public void BaseDimensionsShouldNeverBeNull()
[Fact]
public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
{
- var prevCulture = Thread.CurrentThread.CurrentUICulture;
- Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
+ var prevCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
try {
Assert.Equal("1 cm⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.CentimeterToTheSixth).ToString());
Assert.Equal("1 dm⁶", new WarpingMomentOfInertia(1, WarpingMomentOfInertiaUnit.DecimeterToTheSixth).ToString());
@@ -369,7 +369,7 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture()
}
finally
{
- Thread.CurrentThread.CurrentUICulture = prevCulture;
+ Thread.CurrentThread.CurrentCulture = prevCulture;
}
}
@@ -390,10 +390,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
[Fact]
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.1 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s1"));
Assert.Equal("0.12 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s2"));
Assert.Equal("0.123 m⁶", new WarpingMomentOfInertia(0.123456, WarpingMomentOfInertiaUnit.MeterToTheSixth).ToString("s3"));
@@ -401,7 +401,7 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
@@ -431,10 +431,10 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
[Theory]
[InlineData(null)]
[InlineData("g")]
- public void ToString_NullProvider_EqualsCurrentUICulture(string format)
+ public void ToString_NullProvider_EqualsCurrentCulture(string format)
{
var quantity = WarpingMomentOfInertia.FromMetersToTheSixth(1.0);
- Assert.Equal(quantity.ToString(format, CultureInfo.CurrentUICulture), quantity.ToString(format, null));
+ Assert.Equal(quantity.ToString(format, CultureInfo.CurrentCulture), quantity.ToString(format, null));
}
[Fact]
diff --git a/UnitsNet.Tests/QuantityFormatterTests.cs b/UnitsNet.Tests/QuantityFormatterTests.cs
index 1a4d2315eb..eab7fe8d29 100644
--- a/UnitsNet.Tests/QuantityFormatterTests.cs
+++ b/UnitsNet.Tests/QuantityFormatterTests.cs
@@ -109,10 +109,20 @@ public static void StandardNumericFormatStrings_Equals_ValueWithFormatStringAndA
{
var length = Length.FromMeters(123456789.987654321);
- var expected = string.Format(CultureInfo.CurrentUICulture, $"{{0:{format}}} {{1:a}}", length.Value, length);
+ var expected = string.Format(CultureInfo.CurrentCulture, $"{{0:{format}}} {{1:a}}", length.Value, length);
Assert.Equal(expected, QuantityFormatter.Format(length, format));
}
+ [Fact]
+ public static void StandardNumericFormatStringsAsPartOfLongerFormatStringsWork()
+ {
+ var length = Length.FromMeters(123.321);
+
+ var expected = "The distance is 123.3 m";
+ var actual = string.Format(CultureInfo.InvariantCulture, $"The distance is {length:F1}");
+ Assert.Equal(expected, actual);
+ }
+
[Theory]
[InlineData("000")]
[InlineData("0.00")]
@@ -133,7 +143,7 @@ public static void CustomNumericFormatStrings_Equals_ValueWithFormatStringAndAbb
{
var length = Length.FromMeters(123456789.987654321);
- var expected = string.Format(CultureInfo.CurrentUICulture, $"{{0:{format}}} {{1:a}}", length.Value, length);
+ var expected = string.Format(CultureInfo.CurrentCulture, $"{{0:{format}}} {{1:a}}", length.Value, length);
Assert.Equal(expected, QuantityFormatter.Format(length, format));
}
}
diff --git a/UnitsNet.Tests/QuantityIConvertibleTests.cs b/UnitsNet.Tests/QuantityIConvertibleTests.cs
index 23bcf4f588..a5949444c9 100644
--- a/UnitsNet.Tests/QuantityIConvertibleTests.cs
+++ b/UnitsNet.Tests/QuantityIConvertibleTests.cs
@@ -116,10 +116,10 @@ public void ToSingleTest()
[Fact]
public void ToStringTest()
{
- string expected = _length.ToString(CultureInfo.CurrentUICulture);
- Assert.Equal(expected, LengthAsIConvertible.ToString(CultureInfo.CurrentUICulture));
- Assert.Equal(expected, Convert.ToString(_length, CultureInfo.CurrentUICulture));
- Assert.Equal(expected, Convert.ChangeType(_length, typeof(string), CultureInfo.CurrentUICulture));
+ string expected = _length.ToString(CultureInfo.CurrentCulture);
+ Assert.Equal(expected, LengthAsIConvertible.ToString(CultureInfo.CurrentCulture));
+ Assert.Equal(expected, Convert.ToString(_length, CultureInfo.CurrentCulture));
+ Assert.Equal(expected, Convert.ChangeType(_length, typeof(string), CultureInfo.CurrentCulture));
}
[Fact]
diff --git a/UnitsNet.Tests/QuantityIFormattableTests.cs b/UnitsNet.Tests/QuantityIFormattableTests.cs
index 059b5b22e2..18e670e644 100644
--- a/UnitsNet.Tests/QuantityIFormattableTests.cs
+++ b/UnitsNet.Tests/QuantityIFormattableTests.cs
@@ -43,7 +43,7 @@ public void AFormatWithInvalidIndexThrowsFormatException()
[Fact]
public void VFormatEqualsValueToString()
{
- Assert.Equal(length.Value.ToString(CultureInfo.CurrentUICulture), length.ToString("v"));
+ Assert.Equal(length.Value.ToString(CultureInfo.CurrentCulture), length.ToString("v"));
}
[Fact]
diff --git a/UnitsNet.Tests/QuantityTests.ToString.cs b/UnitsNet.Tests/QuantityTests.ToString.cs
index 06794a8273..f778a6c5c4 100644
--- a/UnitsNet.Tests/QuantityTests.ToString.cs
+++ b/UnitsNet.Tests/QuantityTests.ToString.cs
@@ -31,17 +31,17 @@ public void ReturnsTheOriginalValueAndUnit()
[Fact]
public void FormatsNumberUsingGivenCulture()
{
- var oldCulture = CultureInfo.CurrentUICulture;
+ var oldCulture = CultureInfo.CurrentCulture;
try
{
- CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
Assert.Equal("0.05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString((IFormatProvider)null));
Assert.Equal("0.05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString(CultureInfo.InvariantCulture));
Assert.Equal("0,05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString(new CultureInfo("nb-NO")));
}
finally
{
- CultureInfo.CurrentUICulture = oldCulture;
+ CultureInfo.CurrentCulture = oldCulture;
}
}
}
diff --git a/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs b/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs
index c12c78ea76..238e857dd3 100644
--- a/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs
+++ b/UnitsNet.Tests/UnitAbbreviationsCacheTests.cs
@@ -222,15 +222,14 @@ public void GetDefaultAbbreviationThrowsNotImplementedExceptionIfNoneExist()
public void GetDefaultAbbreviationFallsBackToUsEnglishCulture()
{
var oldCurrentCulture = CultureInfo.CurrentCulture;
- var oldCurrentUICulture = CultureInfo.CurrentUICulture;
try
{
// CurrentCulture affects number formatting, such as comma or dot as decimal separator.
- // CurrentUICulture affects localization, in this case the abbreviation.
+ // CurrentCulture affects localization, in this case the abbreviation.
// Zulu (South Africa)
var zuluCulture = new CultureInfo("zu-ZA");
- CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = zuluCulture;
+ CultureInfo.CurrentCulture = zuluCulture;
var abbreviationsCache = new UnitAbbreviationsCache();
abbreviationsCache.MapUnitToAbbreviation(CustomUnit.Unit1, AmericanCulture, "US english abbreviation for Unit1");
@@ -244,7 +243,6 @@ public void GetDefaultAbbreviationFallsBackToUsEnglishCulture()
finally
{
CultureInfo.CurrentCulture = oldCurrentCulture;
- CultureInfo.CurrentUICulture = oldCurrentUICulture;
}
}
diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs
index 09efb49596..c668ca5724 100644
--- a/UnitsNet/CustomCode/Quantities/Length.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs
@@ -222,11 +222,11 @@ public override string ToString()
/// Length.FromFeetInches(3,2).FeetInches.ToString() outputs: "3 ft 2 in"
///
/// Optional culture to format number and localize unit abbreviations.
- /// If null, defaults to .
+ /// If null, defaults to .
///
public string ToString(IFormatProvider? cultureInfo)
{
- cultureInfo = cultureInfo ?? CultureInfo.CurrentUICulture;
+ cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture;
var footUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Foot, cultureInfo);
var inchUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Inch, cultureInfo);
diff --git a/UnitsNet/CustomCode/Quantities/Mass.extra.cs b/UnitsNet/CustomCode/Quantities/Mass.extra.cs
index adab6a5216..3b8f101e7e 100644
--- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs
@@ -126,11 +126,11 @@ public override string ToString()
/// Mass.FromStonePounds(3,2).StonePounds.ToString() outputs: "3 st 2 lb"
///
/// Optional culture to format number and localize unit abbreviations.
- /// If null, defaults to .
+ /// If null, defaults to .
///
public string ToString(IFormatProvider? cultureInfo)
{
- cultureInfo = cultureInfo ?? CultureInfo.CurrentUICulture;
+ cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture;
var stoneUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Stone, cultureInfo);
var poundUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Pound, cultureInfo);
diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs
index da44bcfde9..0f0511b5bb 100644
--- a/UnitsNet/CustomCode/Quantity.cs
+++ b/UnitsNet/CustomCode/Quantity.cs
@@ -87,7 +87,7 @@ public static bool TryFrom(double value, Enum unit, out IQuantity? quantity)
///
/// Dynamically parse a quantity string representation.
///
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Type of quantity, such as .
/// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type.
/// The parsed quantity.
diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
index b3396b4f5a..907fcd87fb 100644
--- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
+++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
@@ -70,7 +70,7 @@ private void LoadGeneratedAbbreviations()
/// The type of unit enum.
public void MapUnitToAbbreviation(TUnitType unit, params string[] abbreviations) where TUnitType : Enum
{
- MapUnitToAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentUICulture, abbreviations);
+ MapUnitToAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentCulture, abbreviations);
}
///
@@ -83,7 +83,7 @@ public void MapUnitToAbbreviation(TUnitType unit, params string[] abb
/// The type of unit enum.
public void MapUnitToDefaultAbbreviation(TUnitType unit, string abbreviation) where TUnitType : Enum
{
- MapUnitToDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentUICulture, abbreviation);
+ MapUnitToDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentCulture, abbreviation);
}
///
@@ -92,7 +92,7 @@ public void MapUnitToDefaultAbbreviation(TUnitType unit, string abbre
/// in order to or on them later.
///
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations to add.
/// The type of unit enum.
public void MapUnitToAbbreviation(TUnitType unit, IFormatProvider? formatProvider, params string[] abbreviations) where TUnitType : Enum
@@ -112,7 +112,7 @@ public void MapUnitToAbbreviation(TUnitType unit, IFormatProvider? fo
/// in order to or on them later.
///
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviation to add as default.
/// The type of unit enum.
public void MapUnitToDefaultAbbreviation(TUnitType unit, IFormatProvider? formatProvider, string abbreviation) where TUnitType : Enum
@@ -133,7 +133,7 @@ public void MapUnitToDefaultAbbreviation(TUnitType unit, IFormatProvi
///
/// The unit enum type.
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations to add.
public void MapUnitToAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider, params string[] abbreviations)
{
@@ -147,7 +147,7 @@ public void MapUnitToAbbreviation(Type unitType, int unitValue, IFormatProvider?
///
/// The unit enum type.
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviation to add as default.
public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider, string abbreviation)
{
@@ -162,7 +162,7 @@ private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatPro
if (abbreviations == null)
throw new ArgumentNullException(nameof(abbreviations));
- formatProvider ??= CultureInfo.CurrentUICulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentCulture;
if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider))
quantitiesForProvider = _lookupsForCulture[formatProvider] = new UnitTypeToLookup();
@@ -181,7 +181,7 @@ private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatPro
/// Example: GetDefaultAbbreviation<LengthUnit>(LengthUnit.Kilometer) => "km"
///
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// The type of unit enum.
/// The default unit abbreviation string.
public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? formatProvider = null) where TUnitType : Enum
@@ -213,7 +213,7 @@ public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider?
///
/// The unit enum type.
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// The default unit abbreviation string.
public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider = null)
{
@@ -240,7 +240,7 @@ public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvid
///
/// Enum type for units.
/// Enum value for unit.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations associated with unit.
public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider? formatProvider = null) where TUnitType : Enum
{
@@ -252,11 +252,11 @@ public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider?
///
/// Enum type for unit.
/// Enum value for unit.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations associated with unit.
public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvider? formatProvider = null)
{
- formatProvider = formatProvider ?? CultureInfo.CurrentUICulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentCulture;
if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup))
{
@@ -280,11 +280,11 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid
/// Get all abbreviations for all units of a quantity.
///
/// Enum type for unit.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations associated with unit.
public string[] GetAllUnitAbbreviationsForQuantity(Type unitEnumType, IFormatProvider? formatProvider = null)
{
- formatProvider ??= CultureInfo.CurrentUICulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentCulture;
if (!TryGetUnitValueAbbreviationLookup(unitEnumType, formatProvider, out var lookup))
{
@@ -300,7 +300,7 @@ internal bool TryGetUnitValueAbbreviationLookup(Type unitType, IFormatProvider?
{
unitToAbbreviations = null;
- formatProvider ??= CultureInfo.CurrentUICulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentCulture;
if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider))
{
diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs
index cce1e1d14c..7677eae796 100644
--- a/UnitsNet/CustomCode/UnitParser.cs
+++ b/UnitsNet/CustomCode/UnitParser.cs
@@ -43,7 +43,7 @@ static UnitParser()
/// Example: Parse<LengthUnit>("km") => LengthUnit.Kilometer
///
///
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
///
///
public TUnitType Parse(string unitAbbreviation, IFormatProvider? formatProvider = null) where TUnitType : Enum
@@ -60,7 +60,7 @@ public TUnitType Parse(string unitAbbreviation, IFormatProvider? form
/// respectively.
///
/// Unit enum type, such as and .
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit enum value, such as .
/// No units match the abbreviation.
/// More than one unit matches the abbreviation.
@@ -144,7 +144,7 @@ public bool TryParse(string unitAbbreviation, out TUnitType unit) whe
/// Try to parse a unit abbreviation.
///
/// The string value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// The unit enum value as out result.
/// Type of unit enum.
/// True if successful.
@@ -176,7 +176,7 @@ public bool TryParse(string unitAbbreviation, Type unitType, out Enum? unit)
///
/// The string value.
/// Type of unit enum.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// The unit enum value as out result.
/// True if successful.
public bool TryParse(string? unitAbbreviation, Type unitType, IFormatProvider? formatProvider, out Enum? unit)
diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs
index 4cf7669aee..97a70387c1 100644
--- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs
@@ -250,7 +250,7 @@ public static string GetAbbreviation(AccelerationUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(AccelerationUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -451,7 +451,7 @@ public static Acceleration Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Acceleration Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -482,7 +482,7 @@ public static bool TryParse(string? str, out Acceleration result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Acceleration result)
{
return QuantityParser.Default.TryParse(
@@ -510,7 +510,7 @@ public static AccelerationUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -536,7 +536,7 @@ public static bool TryParseUnit(string str, out AccelerationUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out AccelerationUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -859,7 +859,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -867,21 +867,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs
index 4817b1c6cc..9890bc0981 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs
@@ -256,7 +256,7 @@ public static string GetAbbreviation(AmountOfSubstanceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(AmountOfSubstanceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -466,7 +466,7 @@ public static AmountOfSubstance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AmountOfSubstance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -497,7 +497,7 @@ public static bool TryParse(string? str, out AmountOfSubstance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out AmountOfSubstance result)
{
return QuantityParser.Default.TryParse(
@@ -525,7 +525,7 @@ public static AmountOfSubstanceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -551,7 +551,7 @@ public static bool TryParseUnit(string str, out AmountOfSubstanceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out AmountOfSubstanceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -876,7 +876,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -884,21 +884,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs
index abd0f5404d..3f9097e645 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs
@@ -190,7 +190,7 @@ public static string GetAbbreviation(AmplitudeRatioUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(AmplitudeRatioUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -301,7 +301,7 @@ public static AmplitudeRatio Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AmplitudeRatio Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -332,7 +332,7 @@ public static bool TryParse(string? str, out AmplitudeRatio result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out AmplitudeRatio result)
{
return QuantityParser.Default.TryParse(
@@ -360,7 +360,7 @@ public static AmplitudeRatioUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out AmplitudeRatioUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out AmplitudeRatioUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -697,7 +697,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -705,21 +705,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs
index 4b31f648e0..90d782401e 100644
--- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs
@@ -262,7 +262,7 @@ public static string GetAbbreviation(AngleUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(AngleUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -481,7 +481,7 @@ public static Angle Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Angle Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -512,7 +512,7 @@ public static bool TryParse(string? str, out Angle result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Angle result)
{
return QuantityParser.Default.TryParse(
@@ -540,7 +540,7 @@ public static AngleUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -566,7 +566,7 @@ public static bool TryParseUnit(string str, out AngleUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out AngleUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -893,7 +893,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -901,21 +901,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs
index fab3927c45..af34e41f09 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs
@@ -184,7 +184,7 @@ public static string GetAbbreviation(ApparentEnergyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ApparentEnergyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -286,7 +286,7 @@ public static ApparentEnergy Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ApparentEnergy Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -317,7 +317,7 @@ public static bool TryParse(string? str, out ApparentEnergy result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ApparentEnergy result)
{
return QuantityParser.Default.TryParse(
@@ -345,7 +345,7 @@ public static ApparentEnergyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out ApparentEnergyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ApparentEnergyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -672,7 +672,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs
index d5946b9b40..00704d3077 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs
@@ -190,7 +190,7 @@ public static string GetAbbreviation(ApparentPowerUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ApparentPowerUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -301,7 +301,7 @@ public static ApparentPower Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ApparentPower Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ApparentPower result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ApparentPower result)
{
return QuantityParser.Default.TryParse(
@@ -360,7 +360,7 @@ public static ApparentPowerUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ApparentPowerUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ApparentPowerUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -689,7 +689,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs
index dc2c8b8c54..8726105ac7 100644
--- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs
@@ -250,7 +250,7 @@ public static string GetAbbreviation(AreaUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(AreaUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -451,7 +451,7 @@ public static Area Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Area Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -482,7 +482,7 @@ public static bool TryParse(string? str, out Area result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Area result)
{
return QuantityParser.Default.TryParse(
@@ -510,7 +510,7 @@ public static AreaUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -536,7 +536,7 @@ public static bool TryParseUnit(string str, out AreaUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out AreaUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -859,7 +859,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -867,21 +867,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs
index 08676f9b24..df417da1e7 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs
@@ -172,7 +172,7 @@ public static string GetAbbreviation(AreaDensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(AreaDensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -256,7 +256,7 @@ public static AreaDensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AreaDensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -287,7 +287,7 @@ public static bool TryParse(string? str, out AreaDensity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out AreaDensity result)
{
return QuantityParser.Default.TryParse(
@@ -315,7 +315,7 @@ public static AreaDensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out AreaDensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out AreaDensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -638,7 +638,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -646,21 +646,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
index 8988e0ea3f..f709471cfa 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
@@ -202,7 +202,7 @@ public static string GetAbbreviation(AreaMomentOfInertiaUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(AreaMomentOfInertiaUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -331,7 +331,7 @@ public static AreaMomentOfInertia Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AreaMomentOfInertia Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -362,7 +362,7 @@ public static bool TryParse(string? str, out AreaMomentOfInertia result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out AreaMomentOfInertia result)
{
return QuantityParser.Default.TryParse(
@@ -390,7 +390,7 @@ public static AreaMomentOfInertiaUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -416,7 +416,7 @@ public static bool TryParseUnit(string str, out AreaMomentOfInertiaUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out AreaMomentOfInertiaUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -723,7 +723,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs
index 0145f75d03..c5960ed0b4 100644
--- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs
@@ -330,7 +330,7 @@ public static string GetAbbreviation(BitRateUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(BitRateUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -639,7 +639,7 @@ public static BitRate Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static BitRate Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -670,7 +670,7 @@ public static bool TryParse(string? str, out BitRate result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out BitRate result)
{
return QuantityParser.Default.TryParse(
@@ -698,7 +698,7 @@ public static BitRateUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -724,7 +724,7 @@ public static bool TryParseUnit(string str, out BitRateUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out BitRateUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1071,7 +1071,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1079,21 +1079,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
index d629a6d0c8..8c6945d91c 100644
--- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
@@ -184,7 +184,7 @@ public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(BrakeSpecificFuelConsumptionUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -286,7 +286,7 @@ public static BrakeSpecificFuelConsumption Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static BrakeSpecificFuelConsumption Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -317,7 +317,7 @@ public static bool TryParse(string? str, out BrakeSpecificFuelConsumption result
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out BrakeSpecificFuelConsumption result)
{
return QuantityParser.Default.TryParse(
@@ -345,7 +345,7 @@ public static BrakeSpecificFuelConsumptionUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out BrakeSpecificFuelConsumptionUnit
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out BrakeSpecificFuelConsumptionUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -672,7 +672,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs
index 2b679df00b..a8bce3fea6 100644
--- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs
@@ -211,7 +211,7 @@ public static string GetAbbreviation(CapacitanceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(CapacitanceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -349,7 +349,7 @@ public static Capacitance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Capacitance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -380,7 +380,7 @@ public static bool TryParse(string? str, out Capacitance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Capacitance result)
{
return QuantityParser.Default.TryParse(
@@ -408,7 +408,7 @@ public static CapacitanceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -434,7 +434,7 @@ public static bool TryParseUnit(string str, out CapacitanceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out CapacitanceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -743,7 +743,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -751,21 +751,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
index 6ed9d5bb01..462f9b5a2c 100644
--- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
@@ -184,7 +184,7 @@ public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(CoefficientOfThermalExpansionUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -286,7 +286,7 @@ public static CoefficientOfThermalExpansion Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static CoefficientOfThermalExpansion Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -317,7 +317,7 @@ public static bool TryParse(string? str, out CoefficientOfThermalExpansion resul
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out CoefficientOfThermalExpansion result)
{
return QuantityParser.Default.TryParse(
@@ -345,7 +345,7 @@ public static CoefficientOfThermalExpansionUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out CoefficientOfThermalExpansionUni
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out CoefficientOfThermalExpansionUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -672,7 +672,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs
index 2eba18042d..15297d870d 100644
--- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs
@@ -409,7 +409,7 @@ public static string GetAbbreviation(DensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(DensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -844,7 +844,7 @@ public static Density Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Density Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -875,7 +875,7 @@ public static bool TryParse(string? str, out Density result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Density result)
{
return QuantityParser.Default.TryParse(
@@ -903,7 +903,7 @@ public static DensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -929,7 +929,7 @@ public static bool TryParseUnit(string str, out DensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out DensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1304,7 +1304,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1312,21 +1312,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs
index 552a0af9cc..c84c7bb4d0 100644
--- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs
@@ -226,7 +226,7 @@ public static string GetAbbreviation(DurationUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(DurationUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -391,7 +391,7 @@ public static Duration Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Duration Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -422,7 +422,7 @@ public static bool TryParse(string? str, out Duration result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Duration result)
{
return QuantityParser.Default.TryParse(
@@ -450,7 +450,7 @@ public static DurationUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -476,7 +476,7 @@ public static bool TryParseUnit(string str, out DurationUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out DurationUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -791,7 +791,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -799,21 +799,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs
index 1a473fb753..50da1af660 100644
--- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs
@@ -229,7 +229,7 @@ public static string GetAbbreviation(DynamicViscosityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(DynamicViscosityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -394,7 +394,7 @@ public static DynamicViscosity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static DynamicViscosity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -425,7 +425,7 @@ public static bool TryParse(string? str, out DynamicViscosity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out DynamicViscosity result)
{
return QuantityParser.Default.TryParse(
@@ -453,7 +453,7 @@ public static DynamicViscosityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -479,7 +479,7 @@ public static bool TryParseUnit(string str, out DynamicViscosityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out DynamicViscosityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -794,7 +794,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -802,21 +802,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs
index 8da7483e95..e8778623b6 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs
@@ -190,7 +190,7 @@ public static string GetAbbreviation(ElectricAdmittanceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricAdmittanceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -301,7 +301,7 @@ public static ElectricAdmittance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricAdmittance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ElectricAdmittance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricAdmittance result)
{
return QuantityParser.Default.TryParse(
@@ -360,7 +360,7 @@ public static ElectricAdmittanceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ElectricAdmittanceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricAdmittanceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -689,7 +689,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs
index 7ff03984f0..f353ec9463 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs
@@ -199,7 +199,7 @@ public static string GetAbbreviation(ElectricChargeUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricChargeUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -319,7 +319,7 @@ public static ElectricCharge Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricCharge Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -350,7 +350,7 @@ public static bool TryParse(string? str, out ElectricCharge result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCharge result)
{
return QuantityParser.Default.TryParse(
@@ -378,7 +378,7 @@ public static ElectricChargeUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -404,7 +404,7 @@ public static bool TryParseUnit(string str, out ElectricChargeUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricChargeUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -709,7 +709,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -717,21 +717,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
index 98c63cdd7d..46a401a30f 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(ElectricChargeDensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricChargeDensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static ElectricChargeDensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricChargeDensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out ElectricChargeDensity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricChargeDensity result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static ElectricChargeDensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out ElectricChargeDensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricChargeDensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs
index b8fc5e194b..e4b9c97be1 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs
@@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricConductanceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricConductanceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -289,7 +289,7 @@ public static ElectricConductance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricConductance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricConductance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricConductance result)
{
return QuantityParser.Default.TryParse(
@@ -348,7 +348,7 @@ public static ElectricConductanceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricConductanceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricConductanceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -675,7 +675,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs
index 401c08a2bd..05d6597879 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs
@@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricConductivityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricConductivityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -289,7 +289,7 @@ public static ElectricConductivity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricConductivity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricConductivity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricConductivity result)
{
return QuantityParser.Default.TryParse(
@@ -348,7 +348,7 @@ public static ElectricConductivityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricConductivityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricConductivityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -675,7 +675,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs
index 083134c22e..79168272f3 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs
@@ -214,7 +214,7 @@ public static string GetAbbreviation(ElectricCurrentUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricCurrentUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -361,7 +361,7 @@ public static ElectricCurrent Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricCurrent Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -392,7 +392,7 @@ public static bool TryParse(string? str, out ElectricCurrent result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCurrent result)
{
return QuantityParser.Default.TryParse(
@@ -420,7 +420,7 @@ public static ElectricCurrentUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -446,7 +446,7 @@ public static bool TryParseUnit(string str, out ElectricCurrentUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricCurrentUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -757,7 +757,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -765,21 +765,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
index 95f6b63a91..3f19fdd22b 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
@@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricCurrentDensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricCurrentDensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -289,7 +289,7 @@ public static ElectricCurrentDensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricCurrentDensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricCurrentDensity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCurrentDensity result)
{
return QuantityParser.Default.TryParse(
@@ -348,7 +348,7 @@ public static ElectricCurrentDensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricCurrentDensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricCurrentDensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -675,7 +675,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
index dae6d42e34..bfcd86362f 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
@@ -190,7 +190,7 @@ public static string GetAbbreviation(ElectricCurrentGradientUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricCurrentGradientUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -301,7 +301,7 @@ public static ElectricCurrentGradient Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricCurrentGradient Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ElectricCurrentGradient result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricCurrentGradient result)
{
return QuantityParser.Default.TryParse(
@@ -360,7 +360,7 @@ public static ElectricCurrentGradientUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ElectricCurrentGradientUnit unit
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricCurrentGradientUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -689,7 +689,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs
index ffbae6bd46..9790fff6cc 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(ElectricFieldUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricFieldUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static ElectricField Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricField Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out ElectricField result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricField result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static ElectricFieldUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out ElectricFieldUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricFieldUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs
index 1807c84eca..f91f2c6d0e 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs
@@ -193,7 +193,7 @@ public static string GetAbbreviation(ElectricInductanceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricInductanceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -304,7 +304,7 @@ public static ElectricInductance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricInductance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -335,7 +335,7 @@ public static bool TryParse(string? str, out ElectricInductance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricInductance result)
{
return QuantityParser.Default.TryParse(
@@ -363,7 +363,7 @@ public static ElectricInductanceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -389,7 +389,7 @@ public static bool TryParseUnit(string str, out ElectricInductanceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricInductanceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -692,7 +692,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -700,21 +700,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs
index b9dcb6de63..b85de59b90 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs
@@ -196,7 +196,7 @@ public static string GetAbbreviation(ElectricPotentialUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricPotentialUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -316,7 +316,7 @@ public static ElectricPotential Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricPotential Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -347,7 +347,7 @@ public static bool TryParse(string? str, out ElectricPotential result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotential result)
{
return QuantityParser.Default.TryParse(
@@ -375,7 +375,7 @@ public static ElectricPotentialUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -706,7 +706,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
index b338331dac..38d9c099e6 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
@@ -196,7 +196,7 @@ public static string GetAbbreviation(ElectricPotentialAcUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricPotentialAcUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -316,7 +316,7 @@ public static ElectricPotentialAc Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricPotentialAc Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -347,7 +347,7 @@ public static bool TryParse(string? str, out ElectricPotentialAc result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotentialAc result)
{
return QuantityParser.Default.TryParse(
@@ -375,7 +375,7 @@ public static ElectricPotentialAcUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialAcUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialAcUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -706,7 +706,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
index 32236cf3ad..d47ba88419 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
@@ -286,7 +286,7 @@ public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricPotentialChangeRateUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -541,7 +541,7 @@ public static ElectricPotentialChangeRate Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricPotentialChangeRate Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -572,7 +572,7 @@ public static bool TryParse(string? str, out ElectricPotentialChangeRate result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotentialChangeRate result)
{
return QuantityParser.Default.TryParse(
@@ -600,7 +600,7 @@ public static ElectricPotentialChangeRateUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -626,7 +626,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialChangeRateUnit
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialChangeRateUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -961,7 +961,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -969,21 +969,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
index 34ba2e57ba..abef170f68 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
@@ -196,7 +196,7 @@ public static string GetAbbreviation(ElectricPotentialDcUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricPotentialDcUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -316,7 +316,7 @@ public static ElectricPotentialDc Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricPotentialDc Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -347,7 +347,7 @@ public static bool TryParse(string? str, out ElectricPotentialDc result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricPotentialDc result)
{
return QuantityParser.Default.TryParse(
@@ -375,7 +375,7 @@ public static ElectricPotentialDcUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -401,7 +401,7 @@ public static bool TryParseUnit(string str, out ElectricPotentialDcUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricPotentialDcUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -706,7 +706,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -714,21 +714,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs
index d38168a582..c4a6b3c4b5 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs
@@ -202,7 +202,7 @@ public static string GetAbbreviation(ElectricResistanceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricResistanceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -331,7 +331,7 @@ public static ElectricResistance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricResistance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -362,7 +362,7 @@ public static bool TryParse(string? str, out ElectricResistance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricResistance result)
{
return QuantityParser.Default.TryParse(
@@ -390,7 +390,7 @@ public static ElectricResistanceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -416,7 +416,7 @@ public static bool TryParseUnit(string str, out ElectricResistanceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricResistanceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -723,7 +723,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs
index e6ff4a0d6a..d86e867757 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs
@@ -253,7 +253,7 @@ public static string GetAbbreviation(ElectricResistivityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricResistivityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -454,7 +454,7 @@ public static ElectricResistivity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricResistivity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -485,7 +485,7 @@ public static bool TryParse(string? str, out ElectricResistivity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricResistivity result)
{
return QuantityParser.Default.TryParse(
@@ -513,7 +513,7 @@ public static ElectricResistivityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -539,7 +539,7 @@ public static bool TryParseUnit(string str, out ElectricResistivityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricResistivityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -862,7 +862,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -870,21 +870,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
index a9ebb08d7d..c26ff1436b 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
@@ -187,7 +187,7 @@ public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ElectricSurfaceChargeDensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -289,7 +289,7 @@ public static ElectricSurfaceChargeDensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricSurfaceChargeDensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -320,7 +320,7 @@ public static bool TryParse(string? str, out ElectricSurfaceChargeDensity result
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ElectricSurfaceChargeDensity result)
{
return QuantityParser.Default.TryParse(
@@ -348,7 +348,7 @@ public static ElectricSurfaceChargeDensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -374,7 +374,7 @@ public static bool TryParseUnit(string str, out ElectricSurfaceChargeDensityUnit
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ElectricSurfaceChargeDensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -675,7 +675,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -683,21 +683,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs
index b6320a6c03..92887675fa 100644
--- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs
@@ -382,7 +382,7 @@ public static string GetAbbreviation(EnergyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(EnergyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -781,7 +781,7 @@ public static Energy Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Energy Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -812,7 +812,7 @@ public static bool TryParse(string? str, out Energy result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Energy result)
{
return QuantityParser.Default.TryParse(
@@ -840,7 +840,7 @@ public static EnergyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -866,7 +866,7 @@ public static bool TryParseUnit(string str, out EnergyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out EnergyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1233,7 +1233,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1241,21 +1241,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs
index 6c505ed4aa..13fa637270 100644
--- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs
@@ -208,7 +208,7 @@ public static string GetAbbreviation(EntropyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(EntropyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -346,7 +346,7 @@ public static Entropy Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Entropy Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -377,7 +377,7 @@ public static bool TryParse(string? str, out Entropy result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Entropy result)
{
return QuantityParser.Default.TryParse(
@@ -405,7 +405,7 @@ public static EntropyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -431,7 +431,7 @@ public static bool TryParseUnit(string str, out EntropyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out EntropyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -740,7 +740,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -748,21 +748,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs
index 22bde314f0..a5a67f7e93 100644
--- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs
@@ -256,7 +256,7 @@ public static string GetAbbreviation(ForceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ForceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -466,7 +466,7 @@ public static Force Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Force Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -497,7 +497,7 @@ public static bool TryParse(string? str, out Force result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Force result)
{
return QuantityParser.Default.TryParse(
@@ -525,7 +525,7 @@ public static ForceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -551,7 +551,7 @@ public static bool TryParseUnit(string str, out ForceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ForceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -876,7 +876,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -884,21 +884,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs
index 70de0f89be..47d360eb4c 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs
@@ -256,7 +256,7 @@ public static string GetAbbreviation(ForceChangeRateUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ForceChangeRateUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -466,7 +466,7 @@ public static ForceChangeRate Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ForceChangeRate Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -497,7 +497,7 @@ public static bool TryParse(string? str, out ForceChangeRate result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ForceChangeRate result)
{
return QuantityParser.Default.TryParse(
@@ -525,7 +525,7 @@ public static ForceChangeRateUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -551,7 +551,7 @@ public static bool TryParseUnit(string str, out ForceChangeRateUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ForceChangeRateUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -876,7 +876,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -884,21 +884,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs
index f51ae7e407..b06632f34d 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs
@@ -394,7 +394,7 @@ public static string GetAbbreviation(ForcePerLengthUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ForcePerLengthUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -811,7 +811,7 @@ public static ForcePerLength Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ForcePerLength Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -842,7 +842,7 @@ public static bool TryParse(string? str, out ForcePerLength result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ForcePerLength result)
{
return QuantityParser.Default.TryParse(
@@ -870,7 +870,7 @@ public static ForcePerLengthUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -896,7 +896,7 @@ public static bool TryParseUnit(string str, out ForcePerLengthUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ForcePerLengthUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1267,7 +1267,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1275,21 +1275,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs
index ee20a59776..0c5fdff5d5 100644
--- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs
@@ -232,7 +232,7 @@ public static string GetAbbreviation(FrequencyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(FrequencyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -406,7 +406,7 @@ public static Frequency Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Frequency Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -437,7 +437,7 @@ public static bool TryParse(string? str, out Frequency result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Frequency result)
{
return QuantityParser.Default.TryParse(
@@ -465,7 +465,7 @@ public static FrequencyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -491,7 +491,7 @@ public static bool TryParseUnit(string str, out FrequencyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out FrequencyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -808,7 +808,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -816,21 +816,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs
index b1f6bc1ff1..c6363b09fa 100644
--- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs
@@ -193,7 +193,7 @@ public static string GetAbbreviation(FuelEfficiencyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(FuelEfficiencyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -304,7 +304,7 @@ public static FuelEfficiency Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static FuelEfficiency Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -335,7 +335,7 @@ public static bool TryParse(string? str, out FuelEfficiency result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out FuelEfficiency result)
{
return QuantityParser.Default.TryParse(
@@ -363,7 +363,7 @@ public static FuelEfficiencyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -389,7 +389,7 @@ public static bool TryParseUnit(string str, out FuelEfficiencyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out FuelEfficiencyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -692,7 +692,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -700,21 +700,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs
index 0fc224be8f..e32423863b 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs
@@ -274,7 +274,7 @@ public static string GetAbbreviation(HeatFluxUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(HeatFluxUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -511,7 +511,7 @@ public static HeatFlux Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static HeatFlux Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -542,7 +542,7 @@ public static bool TryParse(string? str, out HeatFlux result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out HeatFlux result)
{
return QuantityParser.Default.TryParse(
@@ -570,7 +570,7 @@ public static HeatFluxUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -596,7 +596,7 @@ public static bool TryParseUnit(string str, out HeatFluxUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out HeatFluxUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -927,7 +927,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -935,21 +935,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
index 30287b7a69..3740a28047 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
@@ -184,7 +184,7 @@ public static string GetAbbreviation(HeatTransferCoefficientUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(HeatTransferCoefficientUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -286,7 +286,7 @@ public static HeatTransferCoefficient Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static HeatTransferCoefficient Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -317,7 +317,7 @@ public static bool TryParse(string? str, out HeatTransferCoefficient result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out HeatTransferCoefficient result)
{
return QuantityParser.Default.TryParse(
@@ -345,7 +345,7 @@ public static HeatTransferCoefficientUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out HeatTransferCoefficientUnit unit
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out HeatTransferCoefficientUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -672,7 +672,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs
index 7d9e3b5411..930e98dda5 100644
--- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs
@@ -193,7 +193,7 @@ public static string GetAbbreviation(IlluminanceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(IlluminanceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -304,7 +304,7 @@ public static Illuminance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Illuminance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -335,7 +335,7 @@ public static bool TryParse(string? str, out Illuminance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Illuminance result)
{
return QuantityParser.Default.TryParse(
@@ -363,7 +363,7 @@ public static IlluminanceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -389,7 +389,7 @@ public static bool TryParseUnit(string str, out IlluminanceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out IlluminanceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -692,7 +692,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -700,21 +700,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs
index c3c9d8e7c8..9399dc0f41 100644
--- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs
@@ -327,7 +327,7 @@ public static string GetAbbreviation(InformationUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(InformationUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -636,7 +636,7 @@ public static Information Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Information Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -667,7 +667,7 @@ public static bool TryParse(string? str, out Information result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Information result)
{
return QuantityParser.Default.TryParse(
@@ -695,7 +695,7 @@ public static InformationUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -721,7 +721,7 @@ public static bool TryParseUnit(string str, out InformationUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out InformationUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1068,7 +1068,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1076,21 +1076,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs
index 9e54df430a..b7cc9cfab6 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs
@@ -250,7 +250,7 @@ public static string GetAbbreviation(IrradianceUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(IrradianceUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -451,7 +451,7 @@ public static Irradiance Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Irradiance Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -482,7 +482,7 @@ public static bool TryParse(string? str, out Irradiance result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Irradiance result)
{
return QuantityParser.Default.TryParse(
@@ -510,7 +510,7 @@ public static IrradianceUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -536,7 +536,7 @@ public static bool TryParseUnit(string str, out IrradianceUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out IrradianceUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -859,7 +859,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -867,21 +867,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs
index b767a82648..ce54e68df0 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs
@@ -211,7 +211,7 @@ public static string GetAbbreviation(IrradiationUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(IrradiationUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -349,7 +349,7 @@ public static Irradiation Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Irradiation Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -380,7 +380,7 @@ public static bool TryParse(string? str, out Irradiation result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Irradiation result)
{
return QuantityParser.Default.TryParse(
@@ -408,7 +408,7 @@ public static IrradiationUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -434,7 +434,7 @@ public static bool TryParseUnit(string str, out IrradiationUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out IrradiationUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -743,7 +743,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -751,21 +751,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs
index 461d4b30be..ff5ce17908 100644
--- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs
@@ -223,7 +223,7 @@ public static string GetAbbreviation(KinematicViscosityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(KinematicViscosityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -379,7 +379,7 @@ public static KinematicViscosity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static KinematicViscosity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -410,7 +410,7 @@ public static bool TryParse(string? str, out KinematicViscosity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out KinematicViscosity result)
{
return QuantityParser.Default.TryParse(
@@ -438,7 +438,7 @@ public static KinematicViscosityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -464,7 +464,7 @@ public static bool TryParseUnit(string str, out KinematicViscosityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out KinematicViscosityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -777,7 +777,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -785,21 +785,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs
index d9014c6a68..cfa6517177 100644
--- a/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs
@@ -172,7 +172,7 @@ public static string GetAbbreviation(LapseRateUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LapseRateUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -256,7 +256,7 @@ public static LapseRate Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LapseRate Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -287,7 +287,7 @@ public static bool TryParse(string? str, out LapseRate result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out LapseRate result)
{
return QuantityParser.Default.TryParse(
@@ -315,7 +315,7 @@ public static LapseRateUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out LapseRateUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LapseRateUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -638,7 +638,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -646,21 +646,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs
index 0d520d132f..a2d49b9039 100644
--- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs
@@ -364,7 +364,7 @@ public static string GetAbbreviation(LengthUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LengthUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -736,7 +736,7 @@ public static Length Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Length Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -767,7 +767,7 @@ public static bool TryParse(string? str, out Length result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Length result)
{
return QuantityParser.Default.TryParse(
@@ -795,7 +795,7 @@ public static LengthUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -821,7 +821,7 @@ public static bool TryParseUnit(string str, out LengthUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LengthUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1182,7 +1182,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1190,21 +1190,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs
index dde9e64bfd..b74d165689 100644
--- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs
@@ -178,7 +178,7 @@ public static string GetAbbreviation(LevelUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LevelUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -271,7 +271,7 @@ public static Level Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Level Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -302,7 +302,7 @@ public static bool TryParse(string? str, out Level result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Level result)
{
return QuantityParser.Default.TryParse(
@@ -330,7 +330,7 @@ public static LevelUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -356,7 +356,7 @@ public static bool TryParseUnit(string str, out LevelUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LevelUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -663,7 +663,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -671,21 +671,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs
index 49b0c4ab6f..e6419b21e0 100644
--- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs
@@ -253,7 +253,7 @@ public static string GetAbbreviation(LinearDensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LinearDensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -454,7 +454,7 @@ public static LinearDensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LinearDensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -485,7 +485,7 @@ public static bool TryParse(string? str, out LinearDensity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out LinearDensity result)
{
return QuantityParser.Default.TryParse(
@@ -513,7 +513,7 @@ public static LinearDensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -539,7 +539,7 @@ public static bool TryParseUnit(string str, out LinearDensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LinearDensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -862,7 +862,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -870,21 +870,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs
index c000a43216..7cf6a255dc 100644
--- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs
@@ -319,7 +319,7 @@ public static string GetAbbreviation(LinearPowerDensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LinearPowerDensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -619,7 +619,7 @@ public static LinearPowerDensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LinearPowerDensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -650,7 +650,7 @@ public static bool TryParse(string? str, out LinearPowerDensity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out LinearPowerDensity result)
{
return QuantityParser.Default.TryParse(
@@ -678,7 +678,7 @@ public static LinearPowerDensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -704,7 +704,7 @@ public static bool TryParseUnit(string str, out LinearPowerDensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LinearPowerDensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1049,7 +1049,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1057,21 +1057,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs
index f8e5e51c4a..156af02864 100644
--- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs
@@ -253,7 +253,7 @@ public static string GetAbbreviation(LuminosityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LuminosityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -454,7 +454,7 @@ public static Luminosity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Luminosity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -485,7 +485,7 @@ public static bool TryParse(string? str, out Luminosity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Luminosity result)
{
return QuantityParser.Default.TryParse(
@@ -513,7 +513,7 @@ public static LuminosityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -539,7 +539,7 @@ public static bool TryParseUnit(string str, out LuminosityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LuminosityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -862,7 +862,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -870,21 +870,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs
index 8a9fc756df..3cda60672f 100644
--- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(LuminousFluxUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LuminousFluxUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static LuminousFlux Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LuminousFlux Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out LuminousFlux result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out LuminousFlux result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static LuminousFluxUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out LuminousFluxUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LuminousFluxUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs
index d47ec9da54..a6e45285b5 100644
--- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(LuminousIntensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(LuminousIntensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static LuminousIntensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LuminousIntensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out LuminousIntensity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out LuminousIntensity result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static LuminousIntensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out LuminousIntensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out LuminousIntensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs
index d44f209794..a52dfe861d 100644
--- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs
@@ -205,7 +205,7 @@ public static string GetAbbreviation(MagneticFieldUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MagneticFieldUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -334,7 +334,7 @@ public static MagneticField Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MagneticField Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -365,7 +365,7 @@ public static bool TryParse(string? str, out MagneticField result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MagneticField result)
{
return QuantityParser.Default.TryParse(
@@ -393,7 +393,7 @@ public static MagneticFieldUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -419,7 +419,7 @@ public static bool TryParseUnit(string str, out MagneticFieldUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MagneticFieldUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -726,7 +726,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -734,21 +734,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs
index 0b0326fd95..c7a0dea6a4 100644
--- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(MagneticFluxUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MagneticFluxUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static MagneticFlux Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MagneticFlux Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out MagneticFlux result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MagneticFlux result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static MagneticFluxUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out MagneticFluxUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MagneticFluxUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs
index 5a4be0fba2..905204d465 100644
--- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(MagnetizationUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MagnetizationUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static Magnetization Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Magnetization Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out Magnetization result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Magnetization result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static MagnetizationUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out MagnetizationUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MagnetizationUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs
index ac27f16599..116ec458f6 100644
--- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs
@@ -316,7 +316,7 @@ public static string GetAbbreviation(MassUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MassUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -616,7 +616,7 @@ public static Mass Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Mass Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -647,7 +647,7 @@ public static bool TryParse(string? str, out Mass result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Mass result)
{
return QuantityParser.Default.TryParse(
@@ -675,7 +675,7 @@ public static MassUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -701,7 +701,7 @@ public static bool TryParseUnit(string str, out MassUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MassUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1046,7 +1046,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1054,21 +1054,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs
index 632b14de38..7131eac808 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs
@@ -463,7 +463,7 @@ public static string GetAbbreviation(MassConcentrationUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MassConcentrationUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -979,7 +979,7 @@ public static MassConcentration Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassConcentration Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -1010,7 +1010,7 @@ public static bool TryParse(string? str, out MassConcentration result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MassConcentration result)
{
return QuantityParser.Default.TryParse(
@@ -1038,7 +1038,7 @@ public static MassConcentrationUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -1064,7 +1064,7 @@ public static bool TryParseUnit(string str, out MassConcentrationUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MassConcentrationUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1457,7 +1457,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1465,21 +1465,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs
index d7609a3487..523ddac416 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs
@@ -364,7 +364,7 @@ public static string GetAbbreviation(MassFlowUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MassFlowUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -736,7 +736,7 @@ public static MassFlow Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassFlow Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -767,7 +767,7 @@ public static bool TryParse(string? str, out MassFlow result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MassFlow result)
{
return QuantityParser.Default.TryParse(
@@ -795,7 +795,7 @@ public static MassFlowUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -821,7 +821,7 @@ public static bool TryParseUnit(string str, out MassFlowUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MassFlowUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1182,7 +1182,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1190,21 +1190,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs
index 1a297392bd..ce56bbf12c 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs
@@ -238,7 +238,7 @@ public static string GetAbbreviation(MassFluxUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MassFluxUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -421,7 +421,7 @@ public static MassFlux Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassFlux Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -452,7 +452,7 @@ public static bool TryParse(string? str, out MassFlux result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MassFlux result)
{
return QuantityParser.Default.TryParse(
@@ -480,7 +480,7 @@ public static MassFluxUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -506,7 +506,7 @@ public static bool TryParseUnit(string str, out MassFluxUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MassFluxUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -825,7 +825,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -833,21 +833,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs
index 9334406a91..21a503ca61 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs
@@ -313,7 +313,7 @@ public static string GetAbbreviation(MassFractionUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MassFractionUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -604,7 +604,7 @@ public static MassFraction Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassFraction Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -635,7 +635,7 @@ public static bool TryParse(string? str, out MassFraction result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MassFraction result)
{
return QuantityParser.Default.TryParse(
@@ -663,7 +663,7 @@ public static MassFractionUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -689,7 +689,7 @@ public static bool TryParseUnit(string str, out MassFractionUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MassFractionUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1032,7 +1032,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1040,21 +1040,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
index 84a62383f2..48c655db4c 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
@@ -334,7 +334,7 @@ public static string GetAbbreviation(MassMomentOfInertiaUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MassMomentOfInertiaUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -661,7 +661,7 @@ public static MassMomentOfInertia Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassMomentOfInertia Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -692,7 +692,7 @@ public static bool TryParse(string? str, out MassMomentOfInertia result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MassMomentOfInertia result)
{
return QuantityParser.Default.TryParse(
@@ -720,7 +720,7 @@ public static MassMomentOfInertiaUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -746,7 +746,7 @@ public static bool TryParseUnit(string str, out MassMomentOfInertiaUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MassMomentOfInertiaUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1097,7 +1097,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1105,21 +1105,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs
index cc87c5b14c..61e0bedd83 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs
@@ -184,7 +184,7 @@ public static string GetAbbreviation(MolarEnergyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MolarEnergyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -286,7 +286,7 @@ public static MolarEnergy Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MolarEnergy Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -317,7 +317,7 @@ public static bool TryParse(string? str, out MolarEnergy result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MolarEnergy result)
{
return QuantityParser.Default.TryParse(
@@ -345,7 +345,7 @@ public static MolarEnergyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out MolarEnergyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarEnergyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -672,7 +672,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs
index 4db75c4f9f..dafec903b4 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs
@@ -184,7 +184,7 @@ public static string GetAbbreviation(MolarEntropyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MolarEntropyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -286,7 +286,7 @@ public static MolarEntropy Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MolarEntropy Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -317,7 +317,7 @@ public static bool TryParse(string? str, out MolarEntropy result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MolarEntropy result)
{
return QuantityParser.Default.TryParse(
@@ -345,7 +345,7 @@ public static MolarEntropyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out MolarEntropyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarEntropyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -672,7 +672,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs
index ebcf76fc23..0ba3fa3517 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs
@@ -238,7 +238,7 @@ public static string GetAbbreviation(MolarMassUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MolarMassUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -421,7 +421,7 @@ public static MolarMass Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MolarMass Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -452,7 +452,7 @@ public static bool TryParse(string? str, out MolarMass result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out MolarMass result)
{
return QuantityParser.Default.TryParse(
@@ -480,7 +480,7 @@ public static MolarMassUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -506,7 +506,7 @@ public static bool TryParseUnit(string str, out MolarMassUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarMassUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -825,7 +825,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -833,21 +833,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs
index 7c31fceca1..645c298cc5 100644
--- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs
@@ -217,7 +217,7 @@ public static string GetAbbreviation(MolarityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(MolarityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -364,7 +364,7 @@ public static Molarity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Molarity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -395,7 +395,7 @@ public static bool TryParse(string? str, out Molarity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Molarity result)
{
return QuantityParser.Default.TryParse(
@@ -423,7 +423,7 @@ public static MolarityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -449,7 +449,7 @@ public static bool TryParseUnit(string str, out MolarityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out MolarityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -760,7 +760,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -768,21 +768,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs
index 2263fdb8cb..91d63953e8 100644
--- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(PermeabilityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(PermeabilityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static Permeability Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Permeability Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out Permeability result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Permeability result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static PermeabilityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out PermeabilityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out PermeabilityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs
index f0e0291f0c..85eae6b36f 100644
--- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs
@@ -175,7 +175,7 @@ public static string GetAbbreviation(PermittivityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(PermittivityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -259,7 +259,7 @@ public static Permittivity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Permittivity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -290,7 +290,7 @@ public static bool TryParse(string? str, out Permittivity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Permittivity result)
{
return QuantityParser.Default.TryParse(
@@ -318,7 +318,7 @@ public static PermittivityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -344,7 +344,7 @@ public static bool TryParseUnit(string str, out PermittivityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out PermittivityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -641,7 +641,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -649,21 +649,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs
index a369415538..191e08e6f8 100644
--- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs
@@ -321,7 +321,7 @@ public static string GetAbbreviation(PowerUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(PowerUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -621,7 +621,7 @@ public static Power Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Power Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -652,7 +652,7 @@ public static bool TryParse(string? str, out Power result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Power result)
{
return QuantityParser.Default.TryParse(
@@ -680,7 +680,7 @@ public static PowerUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -706,7 +706,7 @@ public static bool TryParseUnit(string str, out PowerUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out PowerUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1051,7 +1051,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1059,21 +1059,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs
index 881f4b9dd9..2751d895f4 100644
--- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs
@@ -430,7 +430,7 @@ public static string GetAbbreviation(PowerDensityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(PowerDensityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -901,7 +901,7 @@ public static PowerDensity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static PowerDensity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -932,7 +932,7 @@ public static bool TryParse(string? str, out PowerDensity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out PowerDensity result)
{
return QuantityParser.Default.TryParse(
@@ -960,7 +960,7 @@ public static PowerDensityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -986,7 +986,7 @@ public static bool TryParseUnit(string str, out PowerDensityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out PowerDensityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1369,7 +1369,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1377,21 +1377,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs
index 35f3ccb654..85efb4de93 100644
--- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs
@@ -178,7 +178,7 @@ public static string GetAbbreviation(PowerRatioUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(PowerRatioUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -271,7 +271,7 @@ public static PowerRatio Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static PowerRatio Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -302,7 +302,7 @@ public static bool TryParse(string? str, out PowerRatio result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out PowerRatio result)
{
return QuantityParser.Default.TryParse(
@@ -330,7 +330,7 @@ public static PowerRatioUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -356,7 +356,7 @@ public static bool TryParseUnit(string str, out PowerRatioUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out PowerRatioUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -663,7 +663,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -671,21 +671,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs
index c558b69c06..9caa5e9dea 100644
--- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs
@@ -430,7 +430,7 @@ public static string GetAbbreviation(PressureUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(PressureUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -901,7 +901,7 @@ public static Pressure Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Pressure Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -932,7 +932,7 @@ public static bool TryParse(string? str, out Pressure result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Pressure result)
{
return QuantityParser.Default.TryParse(
@@ -960,7 +960,7 @@ public static PressureUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -986,7 +986,7 @@ public static bool TryParseUnit(string str, out PressureUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out PressureUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -1369,7 +1369,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -1377,21 +1377,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs
index de2bbe0c8d..c4f102ab69 100644
--- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs
@@ -244,7 +244,7 @@ public static string GetAbbreviation(PressureChangeRateUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(PressureChangeRateUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -436,7 +436,7 @@ public static PressureChangeRate Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static PressureChangeRate Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -467,7 +467,7 @@ public static bool TryParse(string? str, out PressureChangeRate result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out PressureChangeRate result)
{
return QuantityParser.Default.TryParse(
@@ -495,7 +495,7 @@ public static PressureChangeRateUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -521,7 +521,7 @@ public static bool TryParseUnit(string str, out PressureChangeRateUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out PressureChangeRateUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -842,7 +842,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -850,21 +850,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs
index c80752fcdf..ff6b2f08d9 100644
--- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs
@@ -202,7 +202,7 @@ public static string GetAbbreviation(RatioUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(RatioUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -331,7 +331,7 @@ public static Ratio Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static Ratio Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -362,7 +362,7 @@ public static bool TryParse(string? str, out Ratio result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out Ratio result)
{
return QuantityParser.Default.TryParse(
@@ -390,7 +390,7 @@ public static RatioUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -416,7 +416,7 @@ public static bool TryParseUnit(string str, out RatioUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out RatioUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -723,7 +723,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -731,21 +731,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs
index 278edd1419..1f6a07f1c5 100644
--- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs
@@ -178,7 +178,7 @@ public static string GetAbbreviation(RatioChangeRateUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(RatioChangeRateUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -271,7 +271,7 @@ public static RatioChangeRate Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static RatioChangeRate Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -302,7 +302,7 @@ public static bool TryParse(string? str, out RatioChangeRate result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out RatioChangeRate result)
{
return QuantityParser.Default.TryParse(
@@ -330,7 +330,7 @@ public static RatioChangeRateUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -356,7 +356,7 @@ public static bool TryParseUnit(string str, out RatioChangeRateUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out RatioChangeRateUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -655,7 +655,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -663,21 +663,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs
index 20696902ca..2cdd915e14 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs
@@ -184,7 +184,7 @@ public static string GetAbbreviation(ReactiveEnergyUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ReactiveEnergyUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -286,7 +286,7 @@ public static ReactiveEnergy Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ReactiveEnergy Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -317,7 +317,7 @@ public static bool TryParse(string? str, out ReactiveEnergy result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ReactiveEnergy result)
{
return QuantityParser.Default.TryParse(
@@ -345,7 +345,7 @@ public static ReactiveEnergyUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -371,7 +371,7 @@ public static bool TryParseUnit(string str, out ReactiveEnergyUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ReactiveEnergyUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -672,7 +672,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -680,21 +680,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs
index a6c5e8eb21..cce28dc18b 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs
@@ -190,7 +190,7 @@ public static string GetAbbreviation(ReactivePowerUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ReactivePowerUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -301,7 +301,7 @@ public static ReactivePower Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ReactivePower Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -332,7 +332,7 @@ public static bool TryParse(string? str, out ReactivePower result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ReactivePower result)
{
return QuantityParser.Default.TryParse(
@@ -360,7 +360,7 @@ public static ReactivePowerUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -386,7 +386,7 @@ public static bool TryParseUnit(string str, out ReactivePowerUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ReactivePowerUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -689,7 +689,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -697,21 +697,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs
index f36e585421..65163bdf19 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs
@@ -235,7 +235,7 @@ public static string GetAbbreviation(ReciprocalAreaUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ReciprocalAreaUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -409,7 +409,7 @@ public static ReciprocalArea Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ReciprocalArea Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -440,7 +440,7 @@ public static bool TryParse(string? str, out ReciprocalArea result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ReciprocalArea result)
{
return QuantityParser.Default.TryParse(
@@ -468,7 +468,7 @@ public static ReciprocalAreaUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -494,7 +494,7 @@ public static bool TryParseUnit(string str, out ReciprocalAreaUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ReciprocalAreaUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -811,7 +811,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -819,21 +819,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs
index b33dd46cdf..9563e8560e 100644
--- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs
@@ -229,7 +229,7 @@ public static string GetAbbreviation(ReciprocalLengthUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(ReciprocalLengthUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -394,7 +394,7 @@ public static ReciprocalLength Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ReciprocalLength Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -425,7 +425,7 @@ public static bool TryParse(string? str, out ReciprocalLength result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out ReciprocalLength result)
{
return QuantityParser.Default.TryParse(
@@ -453,7 +453,7 @@ public static ReciprocalLengthUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -479,7 +479,7 @@ public static bool TryParseUnit(string str, out ReciprocalLengthUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out ReciprocalLengthUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -794,7 +794,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{
return ToString("g", provider);
@@ -802,21 +802,21 @@ public string ToString(IFormatProvider? provider)
///
///
- /// Gets the string representation of this instance in the specified format string using .
+ /// Gets the string representation of this instance in the specified format string using .
///
/// The format string.
/// The string representation.
public string ToString(string format)
{
- return ToString(format, CultureInfo.CurrentUICulture);
+ return ToString(format, CultureInfo.CurrentCulture);
}
///
///
- /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
+ /// Gets the string representation of this instance in the specified format string using the specified format provider, or if null.
///
/// The format string.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
/// The string representation.
public string ToString(string format, IFormatProvider? provider)
{
diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs
index 5817cc979d..a4ce4bf2c7 100644
--- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs
@@ -172,7 +172,7 @@ public static string GetAbbreviation(RelativeHumidityUnit unit)
///
/// Unit to get abbreviation for.
/// Unit abbreviation string.
- /// Format to use for localization. Defaults to if null.
+ /// Format to use for localization. Defaults to if null.
public static string GetAbbreviation(RelativeHumidityUnit unit, IFormatProvider? provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -256,7 +256,7 @@ public static RelativeHumidity Parse(string str)
/// We wrap exceptions in to allow you to distinguish
/// Units.NET exceptions from other exceptions.
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static RelativeHumidity Parse(string str, IFormatProvider? provider)
{
return QuantityParser.Default.Parse(
@@ -287,7 +287,7 @@ public static bool TryParse(string? str, out RelativeHumidity result)
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse(string? str, IFormatProvider? provider, out RelativeHumidity result)
{
return QuantityParser.Default.TryParse(
@@ -315,7 +315,7 @@ public static RelativeHumidityUnit ParseUnit(string str)
/// Parse a unit string.
///
/// String to parse. Typically in the form: {number} {unit}
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
///
/// Length.ParseUnit("m", new CultureInfo("en-US"));
///
@@ -341,7 +341,7 @@ public static bool TryParseUnit(string str, out RelativeHumidityUnit unit)
///
/// Length.TryParseUnit("m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParseUnit(string str, IFormatProvider? provider, out RelativeHumidityUnit unit)
{
return UnitParser.Default.TryParse(str, provider, out unit);
@@ -638,7 +638,7 @@ public override string ToString()
/// Gets the default string representation of value and unit using the given format provider.
///
///