Skip to content

Commit ec06ed4

Browse files
committed
Remove breaking API change to IQuantity
1 parent ccd08e8 commit ec06ed4

File tree

114 files changed

+0
-1381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+0
-1381
lines changed

CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -985,15 +985,6 @@ IQuantity IQuantity.ToUnit(Enum unit)
985985
return ToUnit(unitAs{_unitEnumName}, DefaultConversionFunctions);
986986
}}
987987
988-
/// <inheritdoc />
989-
IQuantity IQuantity.ToUnit(Enum unit, UnitConverter unitConverter)
990-
{{
991-
if (!(unit is {_unitEnumName} unitAs{_unitEnumName}))
992-
throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
993-
994-
return ToUnit(unitAs{_unitEnumName}, unitConverter);
995-
}}
996-
997988
/// <inheritdoc cref=""IQuantity.ToUnit(UnitSystem)""/>
998989
public {_quantity.Name} ToUnit(UnitSystem unitSystem)
999990
{{
@@ -1015,9 +1006,6 @@ IQuantity IQuantity.ToUnit(Enum unit, UnitConverter unitConverter)
10151006
/// <inheritdoc />
10161007
IQuantity<{_unitEnumName}> IQuantity<{_unitEnumName}>.ToUnit({_unitEnumName} unit) => ToUnit(unit);
10171008
1018-
/// <inheritdoc />
1019-
IQuantity<{_unitEnumName}> IQuantity<{_unitEnumName}>.ToUnit({_unitEnumName} unit, UnitConverter unitConverter) => ToUnit(unit, unitConverter);
1020-
10211009
/// <inheritdoc />
10221010
IQuantity<{_unitEnumName}> IQuantity<{_unitEnumName}>.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
10231011

UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/Angle.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/Area.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/BitRate.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/Density.g.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)