diff --git a/UnitsNet.Tests/CustomCode/StonePoundsTests.cs b/UnitsNet.Tests/CustomCode/StonePoundsTests.cs
index b215a98d20..b8cafbb920 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", GlobalConfiguration.DefaultCulture); // Varies between machines, can't hard code it
+ string numberInCurrentCulture = 3500.ToString("n0", CultureInfo.CurrentUICulture); // Varies between machines, can't hard code it
Assert.Equal($"{numberInCurrentCulture} st 1 lb", stonePounds.ToString());
}
diff --git a/UnitsNet.Tests/QuantityIConvertibleTests.cs b/UnitsNet.Tests/QuantityIConvertibleTests.cs
index e9ec133655..698d4ce9b9 100644
--- a/UnitsNet.Tests/QuantityIConvertibleTests.cs
+++ b/UnitsNet.Tests/QuantityIConvertibleTests.cs
@@ -1,4 +1,5 @@
using System;
+using System.Globalization;
using UnitsNet.Units;
using Xunit;
@@ -115,10 +116,10 @@ public void ToSingleTest()
[Fact]
public void ToStringTest()
{
- string expected = length.ToString(GlobalConfiguration.DefaultCulture);
- Assert.Equal(expected, lengthAsIConvertible.ToString(GlobalConfiguration.DefaultCulture));
- Assert.Equal(expected, Convert.ToString(length, GlobalConfiguration.DefaultCulture));
- Assert.Equal(expected, Convert.ChangeType(length, typeof(string), GlobalConfiguration.DefaultCulture));
+ 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));
}
[Fact]
diff --git a/UnitsNet.Tests/QuantityTests.ToString.cs b/UnitsNet.Tests/QuantityTests.ToString.cs
index 8dfe6b2978..1e40420098 100644
--- a/UnitsNet.Tests/QuantityTests.ToString.cs
+++ b/UnitsNet.Tests/QuantityTests.ToString.cs
@@ -61,10 +61,10 @@ public void CreatedByCtorWithValueAndUnit_ReturnsValueAndUnit()
[Fact]
public void ReturnsTheOriginalValueAndUnit()
{
- var oldCulture = GlobalConfiguration.DefaultCulture;
+ var oldCulture = CultureInfo.CurrentUICulture;
try
{
- GlobalConfiguration.DefaultCulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
Assert.Equal("5 kg", Mass.FromKilograms(5).ToString());
Assert.Equal("5,000 g", Mass.FromGrams(5000).ToString());
Assert.Equal("1e-04 long tn", Mass.FromLongTons(1e-4).ToString());
@@ -77,17 +77,17 @@ public void ReturnsTheOriginalValueAndUnit()
}
finally
{
- GlobalConfiguration.DefaultCulture = oldCulture;
+ CultureInfo.CurrentUICulture = oldCulture;
}
}
[Fact]
public void ConvertsToTheGivenUnit()
{
- var oldCulture = GlobalConfiguration.DefaultCulture;
+ var oldCulture = CultureInfo.CurrentUICulture;
try
{
- GlobalConfiguration.DefaultCulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
Assert.Equal("5,000 g", Mass.FromKilograms(5).ToUnit(MassUnit.Gram).ToString());
Assert.Equal("5 kg", Mass.FromGrams(5000).ToUnit(MassUnit.Kilogram).ToString());
Assert.Equal("0.05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString());
@@ -95,41 +95,41 @@ public void ConvertsToTheGivenUnit()
}
finally
{
- GlobalConfiguration.DefaultCulture = oldCulture;
+ CultureInfo.CurrentUICulture = oldCulture;
}
}
[Fact]
public void FormatsNumberUsingGivenCulture()
{
- var oldCulture = GlobalConfiguration.DefaultCulture;
+ var oldCulture = CultureInfo.CurrentUICulture;
try
{
- GlobalConfiguration.DefaultCulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
Assert.Equal("0.05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString(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
{
- GlobalConfiguration.DefaultCulture = oldCulture;
+ CultureInfo.CurrentUICulture = oldCulture;
}
}
[Fact]
public void FormatsNumberUsingGivenDigitsAfterRadix()
{
- var oldCulture = GlobalConfiguration.DefaultCulture;
+ var oldCulture = CultureInfo.CurrentUICulture;
try
{
- GlobalConfiguration.DefaultCulture = CultureInfo.InvariantCulture;
+ CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
Assert.Equal("0.05 m", Length.FromCentimeters(5).ToUnit(LengthUnit.Meter).ToString(null, 4));
Assert.Equal("1.97 in", Length.FromCentimeters(5).ToUnit(LengthUnit.Inch).ToString(null, 2));
Assert.Equal("1.9685 in", Length.FromCentimeters(5).ToUnit(LengthUnit.Inch).ToString(null, 4));
}
finally
{
- GlobalConfiguration.DefaultCulture = oldCulture;
+ CultureInfo.CurrentUICulture = oldCulture;
}
}
}
diff --git a/UnitsNet/CustomCode/GlobalConfiguration.cs b/UnitsNet/CustomCode/GlobalConfiguration.cs
index e50c468c5f..746e98dc65 100644
--- a/UnitsNet/CustomCode/GlobalConfiguration.cs
+++ b/UnitsNet/CustomCode/GlobalConfiguration.cs
@@ -3,6 +3,7 @@
using System;
using System.Globalization;
+using System.Threading;
// ReSharper disable once CheckNamespace
namespace UnitsNet
@@ -11,12 +12,17 @@ namespace UnitsNet
/// Global configuration for culture, used as default culture in methods like and
/// .
///
+ [Obsolete("The only property DefaultCulture is now deprecated. Manipulate Thread.CurrentThread.CurrentUICulture instead.")]
public static class GlobalConfiguration
{
///
- /// Defaults to when creating an instance with no culture provided.
- /// Can be overridden, but note that this is static and will affect all subsequent usages.
+ /// Wrapper for .
///
- public static IFormatProvider DefaultCulture { get; set; } = CultureInfo.CurrentUICulture;
+ [Obsolete("Manipulate Thread.CurrentThread.CurrentUICulture instead, this property will be removed.")]
+ public static IFormatProvider DefaultCulture
+ {
+ get => Thread.CurrentThread.CurrentUICulture;
+ set => Thread.CurrentThread.CurrentUICulture = (CultureInfo) value;
+ }
}
}
diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs
index 44d463d6c6..9e0b0db008 100644
--- a/UnitsNet/CustomCode/Quantities/Length.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs
@@ -2,6 +2,7 @@
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
using System;
+using System.Globalization;
using System.Text.RegularExpressions;
using System.Threading;
using JetBrains.Annotations;
@@ -207,7 +208,7 @@ public override string ToString()
///
public string ToString([CanBeNull] IFormatProvider cultureInfo)
{
- cultureInfo = cultureInfo ?? GlobalConfiguration.DefaultCulture;
+ cultureInfo = cultureInfo ?? CultureInfo.CurrentUICulture;
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 9b2b77bc42..9f7f546efe 100644
--- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs
@@ -3,6 +3,7 @@
using System;
using System.Threading;
+using System.Globalization;
using JetBrains.Annotations;
using UnitsNet.Units;
@@ -124,7 +125,7 @@ public override string ToString()
///
public string ToString([CanBeNull] IFormatProvider cultureInfo)
{
- cultureInfo = cultureInfo ?? GlobalConfiguration.DefaultCulture;
+ cultureInfo = cultureInfo ?? CultureInfo.CurrentUICulture;
var stoneUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Stone, cultureInfo);
var poundUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Pound, cultureInfo);
diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
index cfded52e1d..d10b08b5fe 100644
--- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
+++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
@@ -73,7 +73,7 @@ private void LoadGeneratedAbbreviations()
[PublicAPI]
public void MapUnitToAbbreviation(TUnitType unit, params string[] abbreviations) where TUnitType : Enum
{
- MapUnitToAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), GlobalConfiguration.DefaultCulture, abbreviations);
+ MapUnitToAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentUICulture, abbreviations);
}
///
@@ -86,7 +86,7 @@ public void MapUnitToAbbreviation(TUnitType unit, params string[] abb
/// The type of unit enum.
public void MapUnitToDefaultAbbreviation(TUnitType unit, string abbreviation) where TUnitType : Enum
{
- MapUnitToDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), GlobalConfiguration.DefaultCulture, abbreviation);
+ MapUnitToDefaultAbbreviation(typeof(TUnitType), Convert.ToInt32(unit), CultureInfo.CurrentUICulture, abbreviation);
}
///
@@ -95,7 +95,7 @@ public void MapUnitToDefaultAbbreviation(TUnitType unit, string abbre
/// in order to or on them later.
///
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations to add.
/// The type of unit enum.
[PublicAPI]
@@ -116,7 +116,7 @@ public void MapUnitToAbbreviation(TUnitType unit, IFormatProvider for
/// in order to or on them later.
///
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviation to add as default.
/// The type of unit enum.
[PublicAPI]
@@ -138,7 +138,7 @@ public void MapUnitToDefaultAbbreviation(TUnitType unit, IFormatProvi
///
/// The unit enum type.
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations to add.
[PublicAPI]
public void MapUnitToAbbreviation(Type unitType, int unitValue, IFormatProvider formatProvider, [NotNull] params string[] abbreviations)
@@ -153,7 +153,7 @@ public void MapUnitToAbbreviation(Type unitType, int unitValue, IFormatProvider
///
/// The unit enum type.
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviation to add as default.
[PublicAPI]
public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider formatProvider, [NotNull] string abbreviation)
@@ -169,7 +169,7 @@ private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatPro
if (abbreviations == null)
throw new ArgumentNullException(nameof(abbreviations));
- formatProvider = formatProvider ?? GlobalConfiguration.DefaultCulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentUICulture;
if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider))
quantitiesForProvider = _lookupsForCulture[formatProvider] = new UnitTypeToLookup();
@@ -188,7 +188,7 @@ private void PerformAbbreviationMapping(Type unitType, int unitValue, IFormatPro
/// Example: GetDefaultAbbreviation<LengthUnit>(LengthUnit.Kilometer) => "km"
///
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// The type of unit enum.
/// The default unit abbreviation string.
[PublicAPI]
@@ -223,7 +223,7 @@ public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider
///
/// The unit enum type.
/// The unit enum value.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// The default unit abbreviation string.
[PublicAPI]
public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider formatProvider = null)
@@ -253,7 +253,7 @@ public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvid
///
/// Enum type for units.
/// Enum value for unit.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations associated with unit.
[PublicAPI]
public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider formatProvider = null) where TUnitType : Enum
@@ -266,12 +266,12 @@ public string[] GetUnitAbbreviations(TUnitType unit, IFormatProvider
///
/// Enum type for unit.
/// Enum value for unit.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations associated with unit.
[PublicAPI]
public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvider formatProvider = null)
{
- formatProvider = formatProvider ?? GlobalConfiguration.DefaultCulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentUICulture;
if(!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup))
return formatProvider != FallbackCulture ? GetUnitAbbreviations(unitType, unitValue, FallbackCulture) : new string[] { };
@@ -287,12 +287,12 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid
/// Get all abbreviations for all units of a quantity.
///
/// Enum type for unit.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// Unit abbreviations associated with unit.
[PublicAPI]
public string[] GetAllUnitAbbreviationsForQuantity(Type unitEnumType, IFormatProvider formatProvider = null)
{
- formatProvider = formatProvider ?? GlobalConfiguration.DefaultCulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentUICulture;
if(!TryGetUnitValueAbbreviationLookup(unitEnumType, formatProvider, out var lookup))
return formatProvider != FallbackCulture ? GetAllUnitAbbreviationsForQuantity(unitEnumType, FallbackCulture) : new string[] { };
@@ -304,7 +304,7 @@ internal bool TryGetUnitValueAbbreviationLookup(Type unitType, IFormatProvider f
{
unitToAbbreviations = null;
- formatProvider = formatProvider ?? GlobalConfiguration.DefaultCulture;
+ formatProvider = formatProvider ?? CultureInfo.CurrentUICulture;
if(!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider))
return formatProvider != FallbackCulture ? TryGetUnitValueAbbreviationLookup(unitType, FallbackCulture, out unitToAbbreviations) : false;
diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs
index c40438900e..d1065554a3 100644
--- a/UnitsNet/CustomCode/UnitParser.cs
+++ b/UnitsNet/CustomCode/UnitParser.cs
@@ -2,6 +2,7 @@
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
using System;
+using System.Globalization;
using System.Linq;
using JetBrains.Annotations;
using UnitsNet.Units;
@@ -43,7 +44,7 @@ static UnitParser()
/// Example: Parse<LengthUnit>("km") => LengthUnit.Kilometer
///
///
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
///
///
[PublicAPI]
@@ -61,7 +62,7 @@ public TUnitType Parse(string unitAbbreviation, [CanBeNull] IFormatPr
/// 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.
@@ -110,7 +111,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.
@@ -144,7 +145,7 @@ public bool TryParse(string unitAbbreviation, Type unitType, out Enum unit)
///
/// The string value.
/// Type of unit enum.
- /// The format provider to use for lookup. Defaults to if null.
+ /// The format provider to use for lookup. Defaults to if null.
/// The unit enum value as out result.
/// True if successful.
[PublicAPI]
diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs
index 12f2029d89..2b3c13ec87 100644
--- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs
@@ -223,7 +223,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -415,7 +415,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -446,7 +446,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Acceleration result)
{
return QuantityParser.Default.TryParse(
@@ -479,7 +479,7 @@ public static AccelerationUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AccelerationUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -500,7 +500,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);
@@ -794,7 +794,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -805,7 +805,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -819,13 +819,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs
index 2bbc07e0c1..f75e9b2a96 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs
@@ -233,7 +233,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -443,7 +443,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -474,7 +474,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out AmountOfSubstance result)
{
return QuantityParser.Default.TryParse(
@@ -507,7 +507,7 @@ public static AmountOfSubstanceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AmountOfSubstanceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -528,7 +528,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);
@@ -826,7 +826,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -837,7 +837,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -851,13 +851,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs
index 032c797038..6169214bee 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs
@@ -178,7 +178,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -289,7 +289,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -320,7 +320,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out AmplitudeRatio result)
{
return QuantityParser.Default.TryParse(
@@ -353,7 +353,7 @@ public static AmplitudeRatioUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AmplitudeRatioUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -374,7 +374,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);
@@ -658,7 +658,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -669,7 +669,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -683,13 +683,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs
index eb3306c8b2..76064c41e7 100644
--- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs
@@ -228,7 +228,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -429,7 +429,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -460,7 +460,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Angle result)
{
return QuantityParser.Default.TryParse(
@@ -493,7 +493,7 @@ public static AngleUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AngleUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -514,7 +514,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);
@@ -810,7 +810,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -821,7 +821,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -835,13 +835,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs
index f47938bbe5..65bf4d8ae8 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs
@@ -173,7 +173,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -275,7 +275,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -306,7 +306,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ApparentEnergy result)
{
return QuantityParser.Default.TryParse(
@@ -339,7 +339,7 @@ public static ApparentEnergyUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ApparentEnergyUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -360,7 +360,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);
@@ -634,7 +634,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -645,7 +645,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -659,13 +659,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs
index 62dd05784f..3e1bb15055 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs
@@ -178,7 +178,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -289,7 +289,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -320,7 +320,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ApparentPower result)
{
return QuantityParser.Default.TryParse(
@@ -353,7 +353,7 @@ public static ApparentPowerUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ApparentPowerUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -374,7 +374,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);
@@ -650,7 +650,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -661,7 +661,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -675,13 +675,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs
index 1a2079ca59..37c4ec5eb6 100644
--- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs
@@ -223,7 +223,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -415,7 +415,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -446,7 +446,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Area result)
{
return QuantityParser.Default.TryParse(
@@ -479,7 +479,7 @@ public static AreaUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AreaUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -500,7 +500,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);
@@ -794,7 +794,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -805,7 +805,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -819,13 +819,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs
index 5e7711bcb2..404f4d5e94 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs
@@ -163,7 +163,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -247,7 +247,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -278,7 +278,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out AreaDensity result)
{
return QuantityParser.Default.TryParse(
@@ -311,7 +311,7 @@ public static AreaDensityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AreaDensityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -332,7 +332,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);
@@ -602,7 +602,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -613,7 +613,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -627,13 +627,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs
index 4d0bad1cd2..e1bda697bf 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs
@@ -188,7 +188,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -317,7 +317,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -348,7 +348,7 @@ public static bool TryParse([CanBeNull] string str, out AreaMomentOfInertia resu
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out AreaMomentOfInertia result)
{
return QuantityParser.Default.TryParse(
@@ -381,7 +381,7 @@ public static AreaMomentOfInertiaUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static AreaMomentOfInertiaUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -402,7 +402,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);
@@ -682,7 +682,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -693,7 +693,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -707,13 +707,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs
index fc2c68d28e..3e8e0c61ce 100644
--- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs
@@ -293,7 +293,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -602,7 +602,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -633,7 +633,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out BitRate result)
{
return QuantityParser.Default.TryParse(
@@ -666,7 +666,7 @@ public static BitRateUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static BitRateUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -687,7 +687,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);
@@ -1007,7 +1007,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -1018,7 +1018,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -1032,13 +1032,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs
index fa4a19872e..1e4cd006aa 100644
--- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs
@@ -173,7 +173,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -275,7 +275,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -306,7 +306,7 @@ public static bool TryParse([CanBeNull] string str, out BrakeSpecificFuelConsump
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out BrakeSpecificFuelConsumption result)
{
return QuantityParser.Default.TryParse(
@@ -339,7 +339,7 @@ public static BrakeSpecificFuelConsumptionUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static BrakeSpecificFuelConsumptionUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -360,7 +360,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);
@@ -634,7 +634,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -645,7 +645,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -659,13 +659,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs
index a2e5f41682..fbecb8d5ad 100644
--- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs
@@ -196,7 +196,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -334,7 +334,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -365,7 +365,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Capacitance result)
{
return QuantityParser.Default.TryParse(
@@ -398,7 +398,7 @@ public static CapacitanceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static CapacitanceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -419,7 +419,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);
@@ -701,7 +701,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -712,7 +712,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -726,13 +726,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs
index a0c4779ec7..4076e5b95a 100644
--- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs
@@ -173,7 +173,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -275,7 +275,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -306,7 +306,7 @@ public static bool TryParse([CanBeNull] string str, out CoefficientOfThermalExpa
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out CoefficientOfThermalExpansion result)
{
return QuantityParser.Default.TryParse(
@@ -339,7 +339,7 @@ public static CoefficientOfThermalExpansionUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static CoefficientOfThermalExpansionUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -360,7 +360,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);
@@ -634,7 +634,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -645,7 +645,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -659,13 +659,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs
index d2ebdf4d37..880fc956b1 100644
--- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs
@@ -356,7 +356,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -782,7 +782,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -813,7 +813,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Density result)
{
return QuantityParser.Default.TryParse(
@@ -846,7 +846,7 @@ public static DensityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static DensityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -867,7 +867,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);
@@ -1213,7 +1213,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -1224,7 +1224,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -1238,13 +1238,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs
index cb7aecedfd..31032ddab8 100644
--- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs
@@ -208,7 +208,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -373,7 +373,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -404,7 +404,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Duration result)
{
return QuantityParser.Default.TryParse(
@@ -437,7 +437,7 @@ public static DurationUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static DurationUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -458,7 +458,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);
@@ -746,7 +746,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -757,7 +757,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -771,13 +771,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs
index c39ce9a61b..df25a02dea 100644
--- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs
@@ -191,7 +191,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -320,7 +320,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -351,7 +351,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out DynamicViscosity result)
{
return QuantityParser.Default.TryParse(
@@ -384,7 +384,7 @@ public static DynamicViscosityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static DynamicViscosityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -405,7 +405,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);
@@ -685,7 +685,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -696,7 +696,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -710,13 +710,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs
index a075b8cb60..c9515ff510 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs
@@ -178,7 +178,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -289,7 +289,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -320,7 +320,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricAdmittance 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricAdmittance result)
{
return QuantityParser.Default.TryParse(
@@ -353,7 +353,7 @@ public static ElectricAdmittanceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricAdmittanceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -374,7 +374,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);
@@ -650,7 +650,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -661,7 +661,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -675,13 +675,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs
index 11e2ffab74..c7a33053af 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricCharge result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static ElectricChargeUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricChargeUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs
index 47f100ad60..4c2ceddd8e 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricChargeDensity re
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricChargeDensity result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static ElectricChargeDensityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricChargeDensityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs
index c64e25ad4b..1396be33ba 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs
@@ -176,7 +176,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -278,7 +278,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -309,7 +309,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricConductance resu
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricConductance result)
{
return QuantityParser.Default.TryParse(
@@ -342,7 +342,7 @@ public static ElectricConductanceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricConductanceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -363,7 +363,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);
@@ -637,7 +637,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -648,7 +648,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -662,13 +662,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs
index 5b883b3cda..f9e0ab5e54 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricConductivity res
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricConductivity result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static ElectricConductivityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricConductivityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs
index 7e57aa3a03..4f888f7d49 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs
@@ -198,7 +198,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -345,7 +345,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -376,7 +376,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricCurrent result)
{
return QuantityParser.Default.TryParse(
@@ -409,7 +409,7 @@ public static ElectricCurrentUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricCurrentUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -430,7 +430,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);
@@ -714,7 +714,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -725,7 +725,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -739,13 +739,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs
index 6e6324052a..49aec14988 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricCurrentDensity r
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricCurrentDensity result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static ElectricCurrentDensityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricCurrentDensityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs
index 99a7c5b70b..d939f4b8cd 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs
@@ -163,7 +163,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -247,7 +247,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -278,7 +278,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricCurrentGradient
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricCurrentGradient result)
{
return QuantityParser.Default.TryParse(
@@ -311,7 +311,7 @@ public static ElectricCurrentGradientUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricCurrentGradientUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -332,7 +332,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);
@@ -602,7 +602,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -613,7 +613,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -627,13 +627,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs
index 5256568249..9006f4da65 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricField result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static ElectricFieldUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricFieldUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs
index 17bbbb2171..53ac4b7456 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs
@@ -181,7 +181,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -292,7 +292,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -323,7 +323,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricInductance 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricInductance result)
{
return QuantityParser.Default.TryParse(
@@ -356,7 +356,7 @@ public static ElectricInductanceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricInductanceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -377,7 +377,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);
@@ -653,7 +653,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -664,7 +664,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -678,13 +678,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs
index aaed1a740d..c5b442e5ee 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs
@@ -183,7 +183,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -303,7 +303,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -334,7 +334,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricPotential result)
{
return QuantityParser.Default.TryParse(
@@ -367,7 +367,7 @@ public static ElectricPotentialUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricPotentialUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -388,7 +388,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);
@@ -666,7 +666,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -677,7 +677,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -691,13 +691,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs
index a274445ba1..a5ec184fe5 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs
@@ -183,7 +183,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -303,7 +303,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -334,7 +334,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricPotentialAc resu
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricPotentialAc result)
{
return QuantityParser.Default.TryParse(
@@ -367,7 +367,7 @@ public static ElectricPotentialAcUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricPotentialAcUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -388,7 +388,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);
@@ -666,7 +666,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -677,7 +677,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -691,13 +691,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs
index 13f84796cf..bf7d9c94eb 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs
@@ -183,7 +183,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -303,7 +303,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -334,7 +334,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricPotentialDc resu
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricPotentialDc result)
{
return QuantityParser.Default.TryParse(
@@ -367,7 +367,7 @@ public static ElectricPotentialDcUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricPotentialDcUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -388,7 +388,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);
@@ -666,7 +666,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -677,7 +677,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -691,13 +691,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs
index 434512c262..9175f68aa4 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs
@@ -183,7 +183,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -303,7 +303,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -334,7 +334,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricResistance 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricResistance result)
{
return QuantityParser.Default.TryParse(
@@ -367,7 +367,7 @@ public static ElectricResistanceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricResistanceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -388,7 +388,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);
@@ -666,7 +666,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -677,7 +677,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -691,13 +691,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs
index a22afad67d..7e957fe687 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs
@@ -231,7 +231,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -432,7 +432,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -463,7 +463,7 @@ public static bool TryParse([CanBeNull] string str, out ElectricResistivity resu
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ElectricResistivity result)
{
return QuantityParser.Default.TryParse(
@@ -496,7 +496,7 @@ public static ElectricResistivityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ElectricResistivityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -517,7 +517,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);
@@ -813,7 +813,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -824,7 +824,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -838,13 +838,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs
index 8eddad2061..9bdd17836c 100644
--- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs
@@ -273,7 +273,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -555,7 +555,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -586,7 +586,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Energy result)
{
return QuantityParser.Default.TryParse(
@@ -619,7 +619,7 @@ public static EnergyUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static EnergyUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -640,7 +640,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);
@@ -954,7 +954,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -965,7 +965,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -979,13 +979,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs
index e7614d763f..44b10003e7 100644
--- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs
@@ -193,7 +193,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -331,7 +331,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -362,7 +362,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Entropy result)
{
return QuantityParser.Default.TryParse(
@@ -395,7 +395,7 @@ public static EntropyUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static EntropyUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -416,7 +416,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);
@@ -698,7 +698,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -709,7 +709,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -723,13 +723,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs
index 343209e2ab..e67d019360 100644
--- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs
@@ -223,7 +223,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -415,7 +415,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -446,7 +446,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Force result)
{
return QuantityParser.Default.TryParse(
@@ -479,7 +479,7 @@ public static ForceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ForceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -500,7 +500,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);
@@ -794,7 +794,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -805,7 +805,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -819,13 +819,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs
index a169dc111d..25a0877cbe 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs
@@ -213,7 +213,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -387,7 +387,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -418,7 +418,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ForceChangeRate result)
{
return QuantityParser.Default.TryParse(
@@ -451,7 +451,7 @@ public static ForceChangeRateUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ForceChangeRateUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -472,7 +472,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);
@@ -762,7 +762,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -773,7 +773,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -787,13 +787,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs
index b989b5c9a2..cf92627f8d 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs
@@ -203,7 +203,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -359,7 +359,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -390,7 +390,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out ForcePerLength result)
{
return QuantityParser.Default.TryParse(
@@ -423,7 +423,7 @@ public static ForcePerLengthUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static ForcePerLengthUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -444,7 +444,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);
@@ -730,7 +730,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -741,7 +741,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -755,13 +755,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs
index de8566e23b..eea53375ce 100644
--- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs
@@ -203,7 +203,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -359,7 +359,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -390,7 +390,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Frequency result)
{
return QuantityParser.Default.TryParse(
@@ -423,7 +423,7 @@ public static FrequencyUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static FrequencyUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -444,7 +444,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);
@@ -730,7 +730,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -741,7 +741,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -755,13 +755,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs
index 1761fcd300..7a267b6070 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs
@@ -248,7 +248,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -485,7 +485,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -516,7 +516,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out HeatFlux result)
{
return QuantityParser.Default.TryParse(
@@ -549,7 +549,7 @@ public static HeatFluxUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static HeatFluxUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -570,7 +570,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);
@@ -874,7 +874,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -885,7 +885,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -899,13 +899,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs
index 9e44ad4f8e..379bca138b 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs
@@ -168,7 +168,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -261,7 +261,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -292,7 +292,7 @@ public static bool TryParse([CanBeNull] string str, out HeatTransferCoefficient
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out HeatTransferCoefficient result)
{
return QuantityParser.Default.TryParse(
@@ -325,7 +325,7 @@ public static HeatTransferCoefficientUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static HeatTransferCoefficientUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -346,7 +346,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);
@@ -618,7 +618,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -629,7 +629,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -643,13 +643,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs
index f055d1bbef..12786090d1 100644
--- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs
@@ -181,7 +181,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -292,7 +292,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -323,7 +323,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Illuminance result)
{
return QuantityParser.Default.TryParse(
@@ -356,7 +356,7 @@ public static IlluminanceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static IlluminanceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -377,7 +377,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);
@@ -653,7 +653,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -664,7 +664,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -678,13 +678,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs
index 94123fb229..94dfd1b689 100644
--- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs
@@ -290,7 +290,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -599,7 +599,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -630,7 +630,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Information result)
{
return QuantityParser.Default.TryParse(
@@ -663,7 +663,7 @@ public static InformationUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static InformationUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -684,7 +684,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);
@@ -1004,7 +1004,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -1015,7 +1015,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -1029,13 +1029,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs
index 4407210de9..3188e2f0aa 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs
@@ -228,7 +228,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -429,7 +429,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -460,7 +460,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Irradiance result)
{
return QuantityParser.Default.TryParse(
@@ -493,7 +493,7 @@ public static IrradianceUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static IrradianceUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -514,7 +514,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);
@@ -810,7 +810,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -821,7 +821,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -835,13 +835,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs
index 9e47eeaa4f..29e85434e6 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs
@@ -191,7 +191,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -320,7 +320,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -351,7 +351,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Irradiation result)
{
return QuantityParser.Default.TryParse(
@@ -384,7 +384,7 @@ public static IrradiationUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static IrradiationUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -405,7 +405,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);
@@ -685,7 +685,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -696,7 +696,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -710,13 +710,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs
index 9daf25a84c..257179e68a 100644
--- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs
@@ -201,7 +201,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -348,7 +348,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -379,7 +379,7 @@ public static bool TryParse([CanBeNull] string str, out KinematicViscosity 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out KinematicViscosity result)
{
return QuantityParser.Default.TryParse(
@@ -412,7 +412,7 @@ public static KinematicViscosityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static KinematicViscosityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -433,7 +433,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);
@@ -717,7 +717,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -728,7 +728,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -742,13 +742,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs
index 5e23d47d47..1ffbbaeb13 100644
--- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs
@@ -163,7 +163,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -247,7 +247,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -278,7 +278,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out LapseRate result)
{
return QuantityParser.Default.TryParse(
@@ -311,7 +311,7 @@ public static LapseRateUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LapseRateUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -332,7 +332,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);
@@ -602,7 +602,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -613,7 +613,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -627,13 +627,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs
index b36f94125a..4087edce83 100644
--- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs
@@ -268,7 +268,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -541,7 +541,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -572,7 +572,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Length result)
{
return QuantityParser.Default.TryParse(
@@ -605,7 +605,7 @@ public static LengthUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LengthUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -626,7 +626,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);
@@ -938,7 +938,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -949,7 +949,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -963,13 +963,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs
index 9eb2aa5804..8cc1f7fc55 100644
--- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs
@@ -168,7 +168,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -261,7 +261,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -292,7 +292,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Level result)
{
return QuantityParser.Default.TryParse(
@@ -325,7 +325,7 @@ public static LevelUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LevelUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -346,7 +346,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);
@@ -626,7 +626,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -637,7 +637,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -651,13 +651,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs
index e73251d1bb..de996e2362 100644
--- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs
@@ -176,7 +176,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -278,7 +278,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -309,7 +309,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out LinearDensity result)
{
return QuantityParser.Default.TryParse(
@@ -342,7 +342,7 @@ public static LinearDensityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LinearDensityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -363,7 +363,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);
@@ -637,7 +637,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -648,7 +648,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -662,13 +662,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs
index f7a476117b..f35a607a79 100644
--- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out LuminousFlux result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static LuminousFluxUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LuminousFluxUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs
index 814a418c67..b882f914e5 100644
--- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out LuminousIntensity result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static LuminousIntensityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static LuminousIntensityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs
index 170a99c758..303459d9c4 100644
--- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs
@@ -181,7 +181,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -292,7 +292,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -323,7 +323,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MagneticField result)
{
return QuantityParser.Default.TryParse(
@@ -356,7 +356,7 @@ public static MagneticFieldUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MagneticFieldUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -377,7 +377,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);
@@ -653,7 +653,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -664,7 +664,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -678,13 +678,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs
index e7ef438217..b8b15c7818 100644
--- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MagneticFlux result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static MagneticFluxUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MagneticFluxUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs
index 2194f04ea1..574b89f106 100644
--- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Magnetization result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static MagnetizationUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MagnetizationUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs
index eb21fb3e9f..d4b2fa7fc3 100644
--- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs
@@ -273,7 +273,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -555,7 +555,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -586,7 +586,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Mass result)
{
return QuantityParser.Default.TryParse(
@@ -619,7 +619,7 @@ public static MassUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -640,7 +640,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);
@@ -954,7 +954,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -965,7 +965,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -979,13 +979,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs
index 4b2b418c5e..ec6ea3fa05 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs
@@ -313,7 +313,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -667,7 +667,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -698,7 +698,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MassFlow result)
{
return QuantityParser.Default.TryParse(
@@ -731,7 +731,7 @@ public static MassFlowUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassFlowUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -752,7 +752,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);
@@ -1082,7 +1082,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -1093,7 +1093,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -1107,13 +1107,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs
index 8ed633da22..43778a88d0 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs
@@ -168,7 +168,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -261,7 +261,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -292,7 +292,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MassFlux result)
{
return QuantityParser.Default.TryParse(
@@ -325,7 +325,7 @@ public static MassFluxUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassFluxUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -346,7 +346,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);
@@ -618,7 +618,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -629,7 +629,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -643,13 +643,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs
index a5f9acee6e..180fd5ead3 100644
--- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs
@@ -298,7 +298,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -625,7 +625,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -656,7 +656,7 @@ public static bool TryParse([CanBeNull] string str, out MassMomentOfInertia resu
///
/// Length.Parse("5.5 m", new CultureInfo("en-US"));
///
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static bool TryParse([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MassMomentOfInertia result)
{
return QuantityParser.Default.TryParse(
@@ -689,7 +689,7 @@ public static MassMomentOfInertiaUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MassMomentOfInertiaUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -710,7 +710,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);
@@ -1034,7 +1034,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -1045,7 +1045,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -1059,13 +1059,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs
index aaba4e15d8..31b853d795 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs
@@ -173,7 +173,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -275,7 +275,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -306,7 +306,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MolarEnergy result)
{
return QuantityParser.Default.TryParse(
@@ -339,7 +339,7 @@ public static MolarEnergyUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MolarEnergyUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -360,7 +360,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);
@@ -634,7 +634,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -645,7 +645,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -659,13 +659,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs
index 6748fe603d..4992131897 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs
@@ -173,7 +173,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -275,7 +275,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -306,7 +306,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MolarEntropy result)
{
return QuantityParser.Default.TryParse(
@@ -339,7 +339,7 @@ public static MolarEntropyUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MolarEntropyUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -360,7 +360,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);
@@ -634,7 +634,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -645,7 +645,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -659,13 +659,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs
index 1eec53c84c..480a3ea3ad 100644
--- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs
@@ -218,7 +218,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -401,7 +401,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -432,7 +432,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out MolarMass result)
{
return QuantityParser.Default.TryParse(
@@ -465,7 +465,7 @@ public static MolarMassUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MolarMassUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -486,7 +486,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);
@@ -778,7 +778,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -789,7 +789,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -803,13 +803,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs
index d4d2bef075..d495115d3a 100644
--- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs
@@ -201,7 +201,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -348,7 +348,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -379,7 +379,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Molarity result)
{
return QuantityParser.Default.TryParse(
@@ -412,7 +412,7 @@ public static MolarityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static MolarityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -433,7 +433,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);
@@ -717,7 +717,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -728,7 +728,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -742,13 +742,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs
index 4b78b4d0da..129eba6016 100644
--- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] 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([CanBeNull] string str, [CanBeNull] IFormatProvider provider, out Permeability result)
{
return QuantityParser.Default.TryParse(
@@ -314,7 +314,7 @@ public static PermeabilityUnit ParseUnit(string str)
///
/// The value of 'str' cannot be null.
/// Error parsing string.
- /// Format to use when parsing number and unit. Defaults to if null.
+ /// Format to use when parsing number and unit. Defaults to if null.
public static PermeabilityUnit ParseUnit(string str, IFormatProvider provider = null)
{
return UnitParser.Default.Parse(str, provider);
@@ -335,7 +335,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);
@@ -605,7 +605,7 @@ public override string ToString()
/// Get string representation of value and unit. Using two significant digits after radix.
///
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider)
{
return ToString(provider, 2);
@@ -616,7 +616,7 @@ public string ToString([CanBeNull] IFormatProvider provider)
///
/// The number of significant digits after the radix point.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, int significantDigitsAfterRadix)
{
var value = Convert.ToDouble(Value);
@@ -630,13 +630,13 @@ public string ToString([CanBeNull] IFormatProvider provider, int significantDigi
/// String format to use. Default: "{0:0.##} {1} for value and unit abbreviation respectively."
/// Arguments for string format. Value and unit are implictly included as arguments 0 and 1.
/// String representation.
- /// Format to use for localization and number formatting. Defaults to if null.
+ /// Format to use for localization and number formatting. Defaults to if null.
public string ToString([CanBeNull] IFormatProvider provider, [NotNull] string format, [NotNull] params object[] args)
{
if (format == null) throw new ArgumentNullException(nameof(format));
if (args == null) throw new ArgumentNullException(nameof(args));
- provider = provider ?? GlobalConfiguration.DefaultCulture;
+ provider = provider ?? CultureInfo.CurrentUICulture;
var value = Convert.ToDouble(Value);
var formatArgs = UnitFormatter.GetFormatArgs(Unit, value, provider, args);
diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs
index c1e8ba5dba..a855fe78dc 100644
--- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs
@@ -166,7 +166,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, [CanBeNull] IFormatProvider provider)
{
return UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit, provider);
@@ -250,7 +250,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, [CanBeNull] IFormatProvider provider)
{
return QuantityParser.Default.Parse(
@@ -281,7 +281,7 @@ public static bool TryParse([CanBeNull] string str, out Permittivity result)
///