File tree 4 files changed +18
-10
lines changed
4 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,11 @@ public class QuantityParser
35
35
private readonly UnitParser _unitParser ;
36
36
37
37
/// <summary>
38
- /// The default instance of <see cref="QuantityParser"/>, which uses <see cref="UnitsNetSetup"/>.<see cref="UnitsNetSetup.Default"/>.<see cref="UnitsNetSetup.UnitAbbreviations"/> .
38
+ /// The default singleton instance for parsing quantities .
39
39
/// </summary>
40
- [ Obsolete ( "Use UnitsNetSetup.Default.QuantityParser instead." ) ]
40
+ /// <remarks>
41
+ /// Convenience shortcut for <see cref="UnitsNetSetup"/>.<see cref="UnitsNetSetup.Default"/>.<see cref="UnitsNetSetup.QuantityParser"/>.
42
+ /// </remarks>
41
43
public static QuantityParser Default => UnitsNetSetup . Default . QuantityParser ;
42
44
43
45
/// <summary>
Original file line number Diff line number Diff line change @@ -32,9 +32,12 @@ public sealed class UnitAbbreviationsCache
32
32
internal static readonly CultureInfo FallbackCulture = CultureInfo . InvariantCulture ;
33
33
34
34
/// <summary>
35
- /// The static instance used internally for ToString() and Parse() of quantities and units.
35
+ /// The default singleton instance with the default configured unit abbreviations, used for ToString() and parsing of quantities and units.
36
36
/// </summary>
37
- [ Obsolete ( "Use UnitsNetSetup.Default.UnitAbbreviations instead." ) ]
37
+ /// <remarks>
38
+ /// Convenience shortcut for <see cref="UnitsNetSetup"/>.<see cref="UnitsNetSetup.Default"/>.<see cref="UnitsNetSetup.UnitAbbreviations"/>.<br />
39
+ /// You can add custom unit abbreviations at runtime, and this will affect all usages globally in the application.
40
+ /// </remarks>
38
41
public static UnitAbbreviationsCache Default => UnitsNetSetup . Default . UnitAbbreviations ;
39
42
40
43
private QuantityInfoLookup QuantityInfoLookup { get ; }
Original file line number Diff line number Diff line change @@ -20,10 +20,11 @@ public sealed class UnitParser
20
20
private readonly UnitAbbreviationsCache _unitAbbreviationsCache ;
21
21
22
22
/// <summary>
23
- /// The default static instance used internally to parse quantities and units using the
24
- /// default abbreviations cache for all units and abbreviations defined in the library.
23
+ /// The default singleton instance for parsing units from the default configured unit abbreviations.
25
24
/// </summary>
26
- [ Obsolete ( "Use UnitsNetSetup.Default.UnitParser instead." ) ]
25
+ /// <remarks>
26
+ /// Convenience shortcut for <see cref="UnitsNetSetup"/>.<see cref="UnitsNetSetup.Default"/>.<see cref="UnitsNetSetup.UnitParser"/>.
27
+ /// </remarks>
27
28
public static UnitParser Default => UnitsNetSetup . Default . UnitParser ;
28
29
29
30
/// <summary>
Original file line number Diff line number Diff line change @@ -36,10 +36,12 @@ public delegate TQuantity ConversionFunction<TQuantity>(TQuantity inputValue)
36
36
public sealed class UnitConverter
37
37
{
38
38
/// <summary>
39
- /// The static instance used by Units.NET to convert between units. Modify this to add/remove conversion functions at runtime, such
40
- /// as adding your own third-party units and quantities to convert between.
39
+ /// The default singleton instance for converting values from one unit to another.<br />
40
+ /// Modify this to add/remove conversion functions at runtime, such as adding your own third-party units and quantities to convert between.
41
41
/// </summary>
42
- [ Obsolete ( "Use UnitsNetSetup.Default.UnitConverter instead." ) ]
42
+ /// <remarks>
43
+ /// Convenience shortcut for <see cref="UnitsNetSetup"/>.<see cref="UnitsNetSetup.Default"/>.<see cref="UnitsNetSetup.UnitConverter"/>.
44
+ /// </remarks>
43
45
public static UnitConverter Default => UnitsNetSetup . Default . UnitConverter ;
44
46
45
47
/// <summary>
You can’t perform that action at this time.
0 commit comments