@@ -142,49 +142,22 @@ public interface IQuantity<TUnitType> : IQuantity
142142 new IQuantity < TUnitType > ToUnit ( UnitSystem unitSystem ) ;
143143 }
144144
145- /// <summary>
146- /// A quantity backed by a particular value type with a stronger typed interface where the unit enum type is known, to avoid passing in the
147- /// wrong unit enum type and not having to cast from <see cref="Enum"/>.
148- /// </summary>
149- /// <typeparam name="TUnitType">The unit type of the quantity.</typeparam>
150- /// <typeparam name="TValueType">The value type of the quantity.</typeparam>
151- public interface IQuantity < TUnitType , out TValueType > : IQuantity < TUnitType >
152- where TUnitType : Enum
153- #if NET7_0_OR_GREATER
154- where TValueType : INumber < TValueType >
155- #else
156- where TValueType : struct
157- #endif
158- {
159- /// <summary>
160- /// Convert to a unit representation <typeparamref name="TUnitType"/>.
161- /// </summary>
162- /// <returns>Value converted to the specified unit.</returns>
163- new TValueType As ( TUnitType unit ) ;
164- }
165-
166145 /// <summary>
167146 /// An <see cref="IQuantity{TUnitType}"/> that (in .NET 7+) implements generic math interfaces for equality, comparison and parsing.
168147 /// </summary>
169148 /// <typeparam name="TSelf">The type itself, for the CRT pattern.</typeparam>
170149 /// <typeparam name="TUnitType">The underlying unit enum type.</typeparam>
171- /// <typeparam name="TValueType">The underlying value type for internal representation.</typeparam>
172150#if NET7_0_OR_GREATER
173- public interface IQuantity < TSelf , TUnitType , out TValueType >
174- : IQuantity < TUnitType , TValueType >
151+ public interface IQuantity < TSelf , TUnitType >
152+ : IQuantity < TUnitType >
175153 , IComparisonOperators < TSelf , TSelf , bool >
176154 , IParsable < TSelf >
177155#else
178- public interface IQuantity< in TSelf, TUnitType , out TValueType >
179- : IQuantity < TUnitType , TValueType >
156+ public interface IQuantity< in TSelf, TUnitType >
157+ : IQuantity< TUnitType>
180158#endif
181- where TSelf : IQuantity < TSelf , TUnitType , TValueType >
159+ where TSelf : IQuantity < TSelf , TUnitType >
182160 where TUnitType : Enum
183- #if NET7_0_OR_GREATER
184- where TValueType : INumber < TValueType >
185- #else
186- where TValueType : struct
187- #endif
188161 {
189162 /// <summary>
190163 /// <para>
0 commit comments