File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ public sealed class UnitParser
23
23
/// <summary>
24
24
/// Create a parser using the given unit abbreviations cache.
25
25
/// </summary>
26
- /// <param name="unitAbbreviationsCache"></param>
27
- // TODO Change this to not fallback to built-in units abbreviations when given null, in v6: https://github.com/angularsen/UnitsNet/issues/1200
28
- public UnitParser ( UnitAbbreviationsCache ? unitAbbreviationsCache )
26
+ /// <param name="unitAbbreviationsCache">The unit abbreviations to parse with. </param>
27
+ /// <exception cref="ArgumentNullException">No unit abbreviations cache was given.</exception>
28
+ public UnitParser ( UnitAbbreviationsCache unitAbbreviationsCache )
29
29
{
30
- _unitAbbreviationsCache = unitAbbreviationsCache ?? UnitsNetSetup . Default . UnitAbbreviations ;
30
+ _unitAbbreviationsCache = unitAbbreviationsCache ?? throw new ArgumentNullException ( nameof ( unitAbbreviationsCache ) ) ;
31
31
}
32
32
33
33
/// <summary>
You can’t perform that action at this time.
0 commit comments