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
/// Calling <see cref="Default"/> or <see cref="GetCached(string)"/> afterwards will create a new instance.
166
+
/// </summary>
152
167
[PublicAPI]
153
168
publicstaticvoidClearCache()
154
169
{
@@ -185,6 +200,11 @@ public static UnitSystem GetCached([CanBeNull] string cultureName)
185
200
}
186
201
187
202
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
203
+
/// <summary>
204
+
/// Gets or creates the singleton instance configured with localized unit abbreviations and number formatting for the given culture.
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
@@ -268,19 +280,13 @@ public object Parse(string unitAbbreviation, Type unitType)
268
280
}
269
281
}
270
282
271
-
[PublicAPI]
272
-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
/// <param name="unit">The unit enum value.</param>
288
+
/// <typeparam name="TUnitType">The type of unit enum.</typeparam>
289
+
/// <returns>The default unit abbreviation string.</returns>
284
290
[PublicAPI]
285
291
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
/// Adds one or more unit abbreviation for the given unit enum value.
319
+
/// This is used to dynamically add abbreviations for existing unit enums such as <see cref="LengthUnit"/> or to extend with third-party unit enums
320
+
/// in order to <see cref="Parse{TUnitType}"/> or <see cref="GetDefaultAbbreviation{TUnitType}"/> on them later.
321
+
/// </summary>
322
+
/// <param name="unit">The unit enum value.</param>
323
+
/// <param name="abbreviations">Unit abbreviations to add.</param>
324
+
/// <typeparam name="TUnitType">The type of unit enum.</typeparam>
303
325
[PublicAPI]
304
326
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
305
327
#if WINDOWS_UWP
@@ -318,6 +340,14 @@ void MapUnitToAbbreviation<TUnitType>(TUnitType unit, params string[] abbreviati
/// Adds one or more unit abbreviation for the given unit enum value.
345
+
/// This is used to dynamically add abbreviations for existing unit enums such as <see cref="LengthUnit"/> or to extend with third-party unit enums
346
+
/// in order to <see cref="Parse{TUnitType}"/> or <see cref="GetDefaultAbbreviation{TUnitType}"/> on them later.
347
+
/// </summary>
348
+
/// <param name="unitType">The unit enum type.</param>
349
+
/// <param name="unitValue">The unit enum value.</param>
350
+
/// <param name="abbreviations">Unit abbreviations to add.</param>
321
351
[PublicAPI]
322
352
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
/// <param name="unit">The unit enum value as out result.</param>
402
+
/// <typeparam name="TUnitType">Type of unit enum.</typeparam>
403
+
/// <returns>True if successful.</returns>
367
404
[PublicAPI]
368
405
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
369
406
#if WINDOWS_UWP
@@ -386,6 +423,13 @@ bool TryParse<TUnitType>(string unitAbbreviation, out TUnitType unit)
0 commit comments