@@ -142,49 +142,22 @@ public interface IQuantity<TUnitType> : IQuantity
142
142
new IQuantity < TUnitType > ToUnit ( UnitSystem unitSystem ) ;
143
143
}
144
144
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
-
166
145
/// <summary>
167
146
/// An <see cref="IQuantity{TUnitType}"/> that (in .NET 7+) implements generic math interfaces for equality, comparison and parsing.
168
147
/// </summary>
169
148
/// <typeparam name="TSelf">The type itself, for the CRT pattern.</typeparam>
170
149
/// <typeparam name="TUnitType">The underlying unit enum type.</typeparam>
171
- /// <typeparam name="TValueType">The underlying value type for internal representation.</typeparam>
172
150
#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 >
175
153
, IComparisonOperators < TSelf , TSelf , bool >
176
154
, IParsable < TSelf >
177
155
#else
178
- public interface IQuantity< in TSelf, TUnitType , out TValueType >
179
- : IQuantity < TUnitType , TValueType >
156
+ public interface IQuantity< in TSelf, TUnitType >
157
+ : IQuantity< TUnitType>
180
158
#endif
181
- where TSelf : IQuantity < TSelf , TUnitType , TValueType >
159
+ where TSelf : IQuantity < TSelf , TUnitType >
182
160
where TUnitType : Enum
183
- #if NET7_0_OR_GREATER
184
- where TValueType : INumber < TValueType >
185
- #else
186
- where TValueType : struct
187
- #endif
188
161
{
189
162
/// <summary>
190
163
/// <para>
0 commit comments