You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QuantityFormatter: Take UnitAbbreviationsCache instance, Format with TQuantity (#1551)
- `QuantityFormatter`: introducing an `UnitAbbreviationsCache` instance
and `Format`-ing using a generic `TQuantity`
- `UnitsNetSetup`: introduced an instance property for the
`UnitFormatter`
- `IQuantity`: added the `UnitKey` property (implemented explicitly)
- replaced the existing usages of the `QuantityFormatter` and marked the
static `Format` overloads as `[Obsolete]`
fixes#1447
---------
Co-authored-by: Andreas Gullberg Larsen <andreas.larsen84@gmail.com>
/// Gets the string representation of this instance in the specified format string using the specified format provider, or <see cref=""CultureInfo.CurrentCulture"" /> if null.
1184
1189
/// </summary>
1185
-
/// <param name=""format"">The format string.</param>
1186
-
/// <param name=""provider"">Format to use for localization and number formatting. Defaults to <see cref=""CultureInfo.CurrentCulture"" /> if null.</param>
1187
-
/// <returns>The string representation.</returns>
1188
1190
public string ToString(string? format, IFormatProvider? provider)
1189
1191
{{
1190
-
return QuantityFormatter.Format<{_unitEnumName}>(this, format, provider);
1192
+
return QuantityFormatter.Default.Format(this, format, provider);
0 commit comments