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.
167
+
/// </summary>
152
168
[PublicAPI]
153
169
publicstaticvoidClearCache()
154
170
{
@@ -185,6 +201,11 @@ public static UnitSystem GetCached([CanBeNull] string cultureName)
185
201
}
186
202
187
203
// 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
204
+
/// <summary>
205
+
/// 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 +281,13 @@ public object Parse(string unitAbbreviation, Type unitType)
268
281
}
269
282
}
270
283
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>
289
+
/// <typeparam name="TUnitType">The type of unit enum.</typeparam>
290
+
/// <returns>The default unit abbreviation string.</returns>
284
291
[PublicAPI]
285
292
// 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.
320
+
/// This is used to dynamically add abbreviations for existing unit enums such as <see cref="LengthUnit"/> or to extend with third-party unit enums
321
+
/// in order to <see cref="Parse{TUnitType}"/> or <see cref="GetDefaultAbbreviation{TUnitType}"/> on them later.
322
+
/// </summary>
323
+
/// <param name="unit">The unit enum value.</param>
324
+
/// <param name="abbreviations">Unit abbreviations to add.</param>
325
+
/// <typeparam name="TUnitType">The type of unit enum.</typeparam>
303
326
[PublicAPI]
304
327
// 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
328
#if WINDOWS_UWP
@@ -318,6 +341,14 @@ void MapUnitToAbbreviation<TUnitType>(TUnitType unit, params string[] abbreviati
/// Adds one or more unit abbreviation for the given unit enum value.
346
+
/// This is used to dynamically add abbreviations for existing unit enums such as <see cref="LengthUnit"/> or to extend with third-party unit enums
347
+
/// in order to <see cref="Parse{TUnitType}"/> or <see cref="GetDefaultAbbreviation{TUnitType}"/> on them later.
348
+
/// </summary>
349
+
/// <param name="unitType">The unit enum type.</param>
350
+
/// <param name="unitValue">The unit enum value.</param>
351
+
/// <param name="abbreviations">Unit abbreviations to add.</param>
321
352
[PublicAPI]
322
353
// 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>
403
+
/// <typeparam name="TUnitType">Type of unit enum.</typeparam>
404
+
/// <returns>True if successful.</returns>
367
405
[PublicAPI]
368
406
// 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
407
#if WINDOWS_UWP
@@ -386,6 +424,13 @@ bool TryParse<TUnitType>(string unitAbbreviation, out TUnitType unit)
0 commit comments