Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating generic version of structs (WIP) #714

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Commits on Aug 28, 2019

  1. Configuration menu
    Copy the full SHA
    998d59d View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2019

  1. Configuration menu
    Copy the full SHA
    3cfb83a View commit details
    Browse the repository at this point in the history
  2. Cover all methods

    tmilnthorp committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    cc31358 View commit details
    Browse the repository at this point in the history
  3. Consistency for spacing

    tmilnthorp committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    c8b2bf1 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2019

  1. Removing ambiguous calls

    tmilnthorp committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    3799d64 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2019

  1. Generic struct generation

    tmilnthorp committed Oct 22, 2019
    Configuration menu
    Copy the full SHA
    4086e4d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    37b0414 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d88aa34 View commit details
    Browse the repository at this point in the history
  4. Updating tests to generics

    tmilnthorp committed Oct 22, 2019
    Configuration menu
    Copy the full SHA
    3f0aaa1 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2019

  1. Configuration menu
    Copy the full SHA
    a29c061 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e5513c View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2020

  1. Merge remote-tracking branch 'origin/master' into GenericStructs2

    # Conflicts:
    #	CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
    #	CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
    #	CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
    #	UnitsNet.Tests/CompiledLambdasTests.cs
    #	UnitsNet.Tests/CustomCode/AmountOfSubstanceTests.cs
    #	UnitsNet.Tests/CustomCode/LengthTests.FeetInches.cs
    #	UnitsNet.Tests/CustomCode/MassConcentrationTests.cs
    #	UnitsNet.Tests/CustomCode/PressureTests.cs
    #	UnitsNet.Tests/GeneratedCode/AmountOfSubstanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/AmplitudeRatioTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ApparentEnergyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ApparentPowerTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/AreaDensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/AreaMomentOfInertiaTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/BrakeSpecificFuelConsumptionTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/CapacitanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/CoefficientOfThermalExpansionTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/DurationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/DynamicViscosityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricAdmittanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricChargeDensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricChargeTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricConductanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricConductivityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricCurrentDensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricCurrentGradientTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricCurrentTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricFieldTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricInductanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricPotentialAcTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricPotentialDcTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricPotentialTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricResistanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ElectricSurfaceChargeDensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/EnergyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/EntropyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ForcePerLengthTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ForceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/FrequencyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/FuelEfficiencyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/HeatTransferCoefficientTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
    #	UnitsNet.Tests/GeneratedCode/IlluminanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/KinematicViscosityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/LapseRateTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/LevelTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/LinearDensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/LuminosityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/LuminousFluxTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/LuminousIntensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/MagneticFieldTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/MagneticFluxTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/MagnetizationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/MassFluxTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/MolarEnergyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/MolarEntropyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/MolarityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/PermeabilityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/PermittivityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/PowerRatioTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/PowerTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/PressureChangeRateTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/RatioChangeRateTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/RatioTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ReactiveEnergyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ReactivePowerTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/RotationalAccelerationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/RotationalStiffnessPerLengthTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/RotationalStiffnessTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/SolidAngleTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/SpecificEnergyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/SpecificVolumeTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TemperatureDeltaTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TemperatureTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/AccelerationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/AngleTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/AreaTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/BitRateTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/DensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/ElectricResistivityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/ForceChangeRateTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/HeatFluxTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/InformationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/IrradianceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/IrradiationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/LengthTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/MassConcentrationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/MassFlowTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/MassFractionTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/MassMomentOfInertiaTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/MassTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/MolarMassTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/PowerDensityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/PressureTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/RotationalSpeedTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/SpecificWeightTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/SpeedTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/TemperatureChangeRateTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/TorqueTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/VolumeConcentrationTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/VolumeFlowTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/TestsBase/VolumeTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ThermalConductivityTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/ThermalResistanceTestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/VitaminATestsBase.g.cs
    #	UnitsNet.Tests/GeneratedCode/VolumePerLengthTestsBase.g.cs
    #	UnitsNet.Tests/QuantityInfoTest.cs
    #	UnitsNet.Tests/QuantityTests.Ctor.cs
    #	UnitsNet.Tests/QuantityTests.ToString.cs
    #	UnitsNet.Tests/QuantityTests.cs
    #	UnitsNet/CompiledLambdas.cs
    #	UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs
    #	UnitsNet/CustomCode/Quantities/Length.extra.cs
    #	UnitsNet/CustomCode/Quantity.cs
    #	UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs
    #	UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Angle.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Area.g.cs
    #	UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
    #	UnitsNet/GeneratedCode/Quantities/BitRate.g.cs
    #	UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Density.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Duration.g.cs
    #	UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Energy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Entropy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Force.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Frequency.g.cs
    #	UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs
    #	UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs
    #	UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Information.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs
    #	UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/LapseRate.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Length.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Level.g.cs
    #	UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs
    #	UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Mass.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Molarity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Permeability.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Power.g.cs
    #	UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Pressure.g.cs
    #	UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Ratio.g.cs
    #	UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs
    #	UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs
    #	UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs
    #	UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs
    #	UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs
    #	UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs
    #	UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs
    #	UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs
    #	UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Speed.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Temperature.g.cs
    #	UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs
    #	UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs
    #	UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Torque.g.cs
    #	UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs
    #	UnitsNet/GeneratedCode/Quantities/Volume.g.cs
    #	UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs
    #	UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs
    #	UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs
    #	UnitsNet/GeneratedCode/Quantity.g.cs
    #	UnitsNet/GeneratedCode/UnitConverter.g.cs
    #	UnitsNet/QuantityTypeConverter.cs
    #	UnitsNet/UnitConverter.cs
    angularsen committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    4d8b0d2 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2020

  1. Configuration menu
    Copy the full SHA
    47d6128 View commit details
    Browse the repository at this point in the history
  2. Progress on fixing compile errors for Min/MaxValue, Parse, Equals

    - Add `struct` generic constraint to T
    - Add GenericNumberHelper for MinValue, MaxValue
    - Add T to Parse
    - Add T to Equals
    
    The biggest blocker is the conversion functions, how to take dynamic
    code from JSON and make it work with generics.
    
    UnitsNet.Angle.GetValueAs
    UnitsNet.Angle.GetValueInBaseUnit
    angularsen committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    c167713 View commit details
    Browse the repository at this point in the history
  3. Whitespace fix

    angularsen committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    391e952 View commit details
    Browse the repository at this point in the history