@@ -70,7 +70,7 @@ public UnitInfo BaseUnitInfo
7070 {
7171 get => GetGenericBaseUnitInfo ( ) ;
7272 }
73-
73+
7474 /// <inheritdoc cref="BaseUnitInfo" />
7575 protected internal abstract UnitInfo GetGenericBaseUnitInfo ( ) ;
7676
@@ -93,13 +93,13 @@ public IReadOnlyList<UnitInfo> UnitInfos
9393 /// <inheritdoc />
9494 public UnitInfo GetUnitInfoFor ( BaseUnits baseUnits )
9595 {
96- return UnitInfos . GetUnitInfoFor ( baseUnits ) ;
96+ return UnitInfo . GetUnitWithBase ( UnitInfos , baseUnits ) ;
9797 }
9898
9999 /// <inheritdoc />
100100 public IEnumerable < UnitInfo > GetUnitInfosFor ( BaseUnits baseUnits )
101101 {
102- return UnitInfos . GetUnitInfosFor ( baseUnits ) ;
102+ return UnitInfo . GetUnitsWithBase ( UnitInfos , baseUnits ) ;
103103 }
104104
105105 /// <summary>
@@ -142,7 +142,7 @@ protected QuantityInfo(string name, Type quantityType, BaseDimensions baseDimens
142142 {
143143 get => GetBaseUnitInfo ( ) ;
144144 }
145-
145+
146146 /// <inheritdoc cref="BaseUnitInfo" />
147147 protected internal abstract UnitInfo < TUnit > GetBaseUnitInfo ( ) ;
148148
@@ -179,28 +179,28 @@ public UnitInfo<TUnit> this[TUnit unit]
179179 /// <returns>An <see cref="UnitInfo{TUnit}" /> instance containing information about the specified unit.</returns>
180180 /// <exception cref="ArgumentException">Thrown if the specified unit is not valid for this quantity.</exception>
181181 protected internal abstract UnitInfo < TUnit > GetUnitInfo ( TUnit unit ) ;
182-
182+
183183 // /// <inheritdoc cref="QuantityInfo.TryGetUnitInfo" />
184184 // public abstract bool TryGetUnitInfo(TUnit unit, [NotNullWhen(true)] out UnitInfo<TUnit>? unitInfo);
185-
185+
186186 /// <inheritdoc cref="QuantityInfo.GetUnitInfoFor" />
187187 public new UnitInfo < TUnit > GetUnitInfoFor ( BaseUnits baseUnits )
188188 {
189- return UnitInfos . GetUnitInfoFor ( baseUnits ) ;
189+ return UnitInfo . GetUnitWithBase ( UnitInfos , baseUnits ) ;
190190 }
191-
191+
192192 /// <inheritdoc cref="QuantityInfo.GetUnitInfosFor" />
193193 public new IEnumerable < UnitInfo < TUnit > > GetUnitInfosFor ( BaseUnits baseUnits )
194194 {
195- return UnitInfos . GetUnitInfosFor ( baseUnits ) ;
195+ return UnitInfo . GetUnitsWithBase ( UnitInfos , baseUnits ) ;
196196 }
197-
197+
198198 /// <inheritdoc cref="QuantityInfo.From" />
199199 public IQuantity < TUnit > From ( double value , TUnit unit )
200200 {
201201 return CreateGenericQuantity ( value , unit ) ;
202202 }
203-
203+
204204 /// <inheritdoc cref="From(double,TUnit)" />
205205 protected internal abstract IQuantity < TUnit > CreateGenericQuantity ( double value , TUnit unit ) ;
206206
@@ -286,7 +286,7 @@ protected QuantityInfoBase(string name, TQuantity zero, BaseDimensions baseDimen
286286
287287 private QuantityFromDelegate < TQuantity , TUnit > FromDelegate { get ; }
288288
289-
289+
290290 #region Implementation of IQuantityInfo<TQuantity, TUnit>
291291
292292 /// <inheritdoc cref="IQuantityInfo.Zero" />
@@ -307,13 +307,13 @@ protected QuantityInfoBase(string name, TQuantity zero, BaseDimensions baseDimen
307307 /// <inheritdoc cref="IQuantityInfo.GetUnitInfosFor" />
308308 public new IEnumerable < TUnitInfo > GetUnitInfosFor ( BaseUnits baseUnits )
309309 {
310- return UnitInfos . GetUnitInfosFor ( baseUnits ) ;
310+ return UnitInfo . GetUnitsWithBase ( UnitInfos , baseUnits ) ;
311311 }
312312
313313 /// <inheritdoc cref="IQuantityInfo.GetUnitInfoFor" />
314314 public new TUnitInfo GetUnitInfoFor ( BaseUnits baseUnits )
315315 {
316- return UnitInfos . GetUnitInfoFor ( baseUnits ) ;
316+ return UnitInfo . GetUnitWithBase ( UnitInfos , baseUnits ) ;
317317 }
318318
319319 /// <summary>
@@ -334,7 +334,7 @@ TQuantity IQuantityInstanceInfo<TQuantity>.Create(double value, UnitKey unitKey)
334334 }
335335
336336 #endregion
337-
337+
338338 #region Overrides of QuantityInfo<TUnit>
339339
340340 /// <inheritdoc />
@@ -393,9 +393,9 @@ public class QuantityInfo<TQuantity, TUnit> : QuantityInfoBase<TQuantity, TUnit,
393393
394394 [ DebuggerBrowsable ( DebuggerBrowsableState . Never ) ]
395395 private readonly UnitInfo < TQuantity , TUnit > [ ] _unitInfos ;
396-
396+
397397 #if NET
398-
398+
399399 /// <summary>
400400 /// Initializes a new instance of the <see cref="QuantityInfo{TQuantity, TUnit}" /> class using the default quantity name.
401401 /// </summary>
@@ -413,7 +413,7 @@ public QuantityInfo(TUnit baseUnit, IEnumerable<IUnitDefinition<TUnit>> unitMapp
413413 : this ( typeof ( TQuantity ) . Name , baseUnit , unitMappings , baseDimensions , TQuantity . From , unitAbbreviations )
414414 {
415415 }
416-
416+
417417 /// <summary>
418418 /// Initializes a new instance of the <see cref="QuantityInfo{TQuantity, TUnit}" /> class.
419419 /// </summary>
@@ -432,7 +432,7 @@ public QuantityInfo(string name, TUnit baseUnit, IEnumerable<IUnitDefinition<TUn
432432 : this ( name , baseUnit , unitMappings , TQuantity . From ( 0 , baseUnit ) , baseDimensions , TQuantity . From , unitAbbreviations )
433433 {
434434 }
435-
435+
436436 #endif
437437
438438 /// <summary>
@@ -454,7 +454,7 @@ public QuantityInfo(TUnit baseUnit, IEnumerable<IUnitDefinition<TUnit>> unitMapp
454454 : this ( typeof ( TQuantity ) . Name , baseUnit , unitMappings , baseDimensions , fromDelegate , unitAbbreviations )
455455 {
456456 }
457-
457+
458458 /// <summary>
459459 /// Initializes a new instance of the <see cref="QuantityInfo{TQuantity, TUnit}" /> class.
460460 /// </summary>
@@ -554,7 +554,7 @@ public sealed override IReadOnlyList<UnitInfo<TQuantity, TUnit>> UnitInfos
554554 #endregion
555555
556556 #region Explicit implementation of IQuantityInfo<TUnit>
557-
557+
558558 // [DebuggerBrowsable(DebuggerBrowsableState.Never)]
559559 // IReadOnlyCollection<UnitInfo<TUnit>> IQuantityInfo<TUnit>.UnitInfos
560560 // {
@@ -605,13 +605,13 @@ public sealed override IReadOnlyList<UnitInfo<TQuantity, TUnit>> UnitInfos
605605 // get => Zero;
606606 // }
607607
608-
608+
609609 // /// <inheritdoc />
610610 // TQuantity IQuantityInstanceInfo<TQuantity>.Create(QuantityValue value, UnitKey unitKey)
611611 // {
612612 // return From(value, unitKey.ToUnit<TUnit>());
613613 // }
614-
614+
615615 #endregion
616616
617617 #region Implementation of IQuantityInfo<TQuantity,TUnit>
0 commit comments