From 780ef703d5ef4a8c3040bfba81b36788b1d2f357 Mon Sep 17 00:00:00 2001 From: Tristan Milnthorp Date: Thu, 28 Feb 2019 23:18:29 -0500 Subject: [PATCH] Renaming confusing methods --- .../Quantities/AmountOfSubstance.extra.cs | 2 +- .../Quantities/Acceleration.NetFramework.g.cs | 26 +++++++-------- .../AmountOfSubstance.NetFramework.g.cs | 26 +++++++-------- .../AmplitudeRatio.NetFramework.g.cs | 28 ++++++++-------- .../Quantities/Angle.NetFramework.g.cs | 26 +++++++-------- .../ApparentEnergy.NetFramework.g.cs | 26 +++++++-------- .../ApparentPower.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Area.NetFramework.g.cs | 26 +++++++-------- .../Quantities/AreaDensity.NetFramework.g.cs | 26 +++++++-------- .../AreaMomentOfInertia.NetFramework.g.cs | 26 +++++++-------- .../Quantities/BitRate.NetFramework.g.cs | 26 +++++++-------- ...eSpecificFuelConsumption.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Capacitance.NetFramework.g.cs | 26 +++++++-------- ...icientOfThermalExpansion.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Density.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Duration.NetFramework.g.cs | 26 +++++++-------- .../DynamicViscosity.NetFramework.g.cs | 26 +++++++-------- .../ElectricAdmittance.NetFramework.g.cs | 26 +++++++-------- .../ElectricCharge.NetFramework.g.cs | 26 +++++++-------- .../ElectricChargeDensity.NetFramework.g.cs | 26 +++++++-------- .../ElectricConductance.NetFramework.g.cs | 26 +++++++-------- .../ElectricConductivity.NetFramework.g.cs | 26 +++++++-------- .../ElectricCurrent.NetFramework.g.cs | 26 +++++++-------- .../ElectricCurrentDensity.NetFramework.g.cs | 26 +++++++-------- .../ElectricCurrentGradient.NetFramework.g.cs | 26 +++++++-------- .../ElectricField.NetFramework.g.cs | 26 +++++++-------- .../ElectricInductance.NetFramework.g.cs | 26 +++++++-------- .../ElectricPotential.NetFramework.g.cs | 26 +++++++-------- .../ElectricPotentialAc.NetFramework.g.cs | 26 +++++++-------- .../ElectricPotentialDc.NetFramework.g.cs | 26 +++++++-------- .../ElectricResistance.NetFramework.g.cs | 26 +++++++-------- .../ElectricResistivity.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Energy.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Entropy.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Force.NetFramework.g.cs | 26 +++++++-------- .../ForceChangeRate.NetFramework.g.cs | 26 +++++++-------- .../ForcePerLength.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Frequency.NetFramework.g.cs | 26 +++++++-------- .../Quantities/HeatFlux.NetFramework.g.cs | 26 +++++++-------- .../HeatTransferCoefficient.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Illuminance.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Information.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Irradiance.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Irradiation.NetFramework.g.cs | 26 +++++++-------- .../KinematicViscosity.NetFramework.g.cs | 26 +++++++-------- .../Quantities/LapseRate.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Length.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Level.NetFramework.g.cs | 28 ++++++++-------- .../LinearDensity.NetFramework.g.cs | 26 +++++++-------- .../Quantities/LuminousFlux.NetFramework.g.cs | 26 +++++++-------- .../LuminousIntensity.NetFramework.g.cs | 26 +++++++-------- .../MagneticField.NetFramework.g.cs | 26 +++++++-------- .../Quantities/MagneticFlux.NetFramework.g.cs | 26 +++++++-------- .../Magnetization.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Mass.NetFramework.g.cs | 26 +++++++-------- .../Quantities/MassFlow.NetFramework.g.cs | 26 +++++++-------- .../Quantities/MassFlux.NetFramework.g.cs | 26 +++++++-------- .../MassMomentOfInertia.NetFramework.g.cs | 26 +++++++-------- .../Quantities/MolarEnergy.NetFramework.g.cs | 26 +++++++-------- .../Quantities/MolarEntropy.NetFramework.g.cs | 26 +++++++-------- .../Quantities/MolarMass.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Molarity.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Permeability.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Permittivity.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Power.NetFramework.g.cs | 26 +++++++-------- .../Quantities/PowerDensity.NetFramework.g.cs | 26 +++++++-------- .../Quantities/PowerRatio.NetFramework.g.cs | 28 ++++++++-------- .../Quantities/Pressure.NetFramework.g.cs | 26 +++++++-------- .../PressureChangeRate.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Ratio.NetFramework.g.cs | 26 +++++++-------- .../ReactiveEnergy.NetFramework.g.cs | 26 +++++++-------- .../ReactivePower.NetFramework.g.cs | 26 +++++++-------- .../RotationalAcceleration.NetFramework.g.cs | 26 +++++++-------- .../RotationalSpeed.NetFramework.g.cs | 26 +++++++-------- .../RotationalStiffness.NetFramework.g.cs | 26 +++++++-------- ...tionalStiffnessPerLength.NetFramework.g.cs | 26 +++++++-------- .../Quantities/SolidAngle.NetFramework.g.cs | 26 +++++++-------- .../SpecificEnergy.NetFramework.g.cs | 26 +++++++-------- .../SpecificEntropy.NetFramework.g.cs | 26 +++++++-------- .../SpecificVolume.NetFramework.g.cs | 26 +++++++-------- .../SpecificWeight.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Speed.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Temperature.NetFramework.g.cs | 22 ++++++------- .../TemperatureChangeRate.NetFramework.g.cs | 26 +++++++-------- .../TemperatureDelta.NetFramework.g.cs | 26 +++++++-------- .../ThermalConductivity.NetFramework.g.cs | 26 +++++++-------- .../ThermalResistance.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Torque.NetFramework.g.cs | 26 +++++++-------- .../Quantities/VitaminA.NetFramework.g.cs | 26 +++++++-------- .../Quantities/Volume.NetFramework.g.cs | 26 +++++++-------- .../Quantities/VolumeFlow.NetFramework.g.cs | 26 +++++++-------- .../Include-GenerateQuantitySourceCode.ps1 | 32 +++++++++---------- 92 files changed, 1188 insertions(+), 1188 deletions(-) diff --git a/UnitsNet/CustomCode/Quantities/AmountOfSubstance.extra.cs b/UnitsNet/CustomCode/Quantities/AmountOfSubstance.extra.cs index a4e1de64f8..b8f5390a4c 100644 --- a/UnitsNet/CustomCode/Quantities/AmountOfSubstance.extra.cs +++ b/UnitsNet/CustomCode/Quantities/AmountOfSubstance.extra.cs @@ -48,7 +48,7 @@ public partial struct AmountOfSubstance /// The number of particles (atoms or molecules) in this amount of substance. public double NumberOfParticles() { - var moles = AsBaseNumericType(AmountOfSubstanceUnit.Mole); + var moles = GetValueAs(AmountOfSubstanceUnit.Mole); return AvogadroConstant * moles; } } diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 2b3c13ec87..66f52977ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -519,13 +519,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Accele /// Get from adding two . public static Acceleration operator +(Acceleration left, Acceleration right) { - return new Acceleration(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Acceleration(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Acceleration operator -(Acceleration left, Acceleration right) { - return new Acceleration(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Acceleration(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -559,25 +559,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Accele /// Returns true if less or equal to. public static bool operator <=(Acceleration left, Acceleration right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Acceleration left, Acceleration right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Acceleration left, Acceleration right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Acceleration left, Acceleration right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -606,7 +606,7 @@ public int CompareTo(object obj) /// public int CompareTo(Acceleration other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -623,7 +623,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Acceleration other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -701,7 +701,7 @@ public double As(AccelerationUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -714,7 +714,7 @@ public double As(AccelerationUnit unit) /// A Acceleration with the specified unit. public Acceleration ToUnit(AccelerationUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Acceleration(convertedValue, unit); } @@ -728,7 +728,7 @@ public Acceleration ToUnit(AccelerationUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -750,12 +750,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(AccelerationUnit unit) + private double GetValueAs(AccelerationUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index f75e9b2a96..4f7584aae9 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -547,13 +547,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amount /// Get from adding two . public static AmountOfSubstance operator +(AmountOfSubstance left, AmountOfSubstance right) { - return new AmountOfSubstance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new AmountOfSubstance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static AmountOfSubstance operator -(AmountOfSubstance left, AmountOfSubstance right) { - return new AmountOfSubstance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new AmountOfSubstance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -587,25 +587,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amount /// Returns true if less or equal to. public static bool operator <=(AmountOfSubstance left, AmountOfSubstance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(AmountOfSubstance left, AmountOfSubstance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(AmountOfSubstance left, AmountOfSubstance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(AmountOfSubstance left, AmountOfSubstance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -634,7 +634,7 @@ public int CompareTo(object obj) /// public int CompareTo(AmountOfSubstance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -651,7 +651,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(AmountOfSubstance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -729,7 +729,7 @@ public double As(AmountOfSubstanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -742,7 +742,7 @@ public double As(AmountOfSubstanceUnit unit) /// A AmountOfSubstance with the specified unit. public AmountOfSubstance ToUnit(AmountOfSubstanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new AmountOfSubstance(convertedValue, unit); } @@ -756,7 +756,7 @@ public AmountOfSubstance ToUnit(AmountOfSubstanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -780,12 +780,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(AmountOfSubstanceUnit unit) + private double GetValueAs(AmountOfSubstanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index 6169214bee..cefadac112 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -395,7 +395,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit { // Logarithmic addition // Formula: 20*log10(10^(x/20) + 10^(y/20)) - return new AmplitudeRatio(20*Math.Log10(Math.Pow(10, left.Value/20) + Math.Pow(10, right.AsBaseNumericType(left.Unit)/20)), left.Unit); + return new AmplitudeRatio(20*Math.Log10(Math.Pow(10, left.Value/20) + Math.Pow(10, right.GetValueAs(left.Unit)/20)), left.Unit); } /// Get from logarithmic subtraction of two . @@ -403,7 +403,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit { // Logarithmic subtraction // Formula: 20*log10(10^(x/20) - 10^(y/20)) - return new AmplitudeRatio(20*Math.Log10(Math.Pow(10, left.Value/20) - Math.Pow(10, right.AsBaseNumericType(left.Unit)/20)), left.Unit); + return new AmplitudeRatio(20*Math.Log10(Math.Pow(10, left.Value/20) - Math.Pow(10, right.GetValueAs(left.Unit)/20)), left.Unit); } /// Get from logarithmic multiplication of value and . @@ -431,7 +431,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit public static double operator /(AmplitudeRatio left, AmplitudeRatio right) { // Logarithmic division = subtraction - return Convert.ToDouble(left.Value - right.AsBaseNumericType(left.Unit)); + return Convert.ToDouble(left.Value - right.GetValueAs(left.Unit)); } #endregion @@ -441,25 +441,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit /// Returns true if less or equal to. public static bool operator <=(AmplitudeRatio left, AmplitudeRatio right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(AmplitudeRatio left, AmplitudeRatio right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(AmplitudeRatio left, AmplitudeRatio right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(AmplitudeRatio left, AmplitudeRatio right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -488,7 +488,7 @@ public int CompareTo(object obj) /// public int CompareTo(AmplitudeRatio other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -505,7 +505,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(AmplitudeRatio other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -583,7 +583,7 @@ public double As(AmplitudeRatioUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -596,7 +596,7 @@ public double As(AmplitudeRatioUnit unit) /// A AmplitudeRatio with the specified unit. public AmplitudeRatio ToUnit(AmplitudeRatioUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new AmplitudeRatio(convertedValue, unit); } @@ -610,7 +610,7 @@ public AmplitudeRatio ToUnit(AmplitudeRatioUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -623,12 +623,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(AmplitudeRatioUnit unit) + private double GetValueAs(AmplitudeRatioUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index 76064c41e7..ba942a7889 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -533,13 +533,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AngleU /// Get from adding two . public static Angle operator +(Angle left, Angle right) { - return new Angle(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Angle(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Angle operator -(Angle left, Angle right) { - return new Angle(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Angle(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -573,25 +573,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AngleU /// Returns true if less or equal to. public static bool operator <=(Angle left, Angle right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Angle left, Angle right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Angle left, Angle right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Angle left, Angle right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -620,7 +620,7 @@ public int CompareTo(object obj) /// public int CompareTo(Angle other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -637,7 +637,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Angle other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -715,7 +715,7 @@ public double As(AngleUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -728,7 +728,7 @@ public double As(AngleUnit unit) /// A Angle with the specified unit. public Angle ToUnit(AngleUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Angle(convertedValue, unit); } @@ -742,7 +742,7 @@ public Angle ToUnit(AngleUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -765,12 +765,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(AngleUnit unit) + private double GetValueAs(AngleUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index 65bf4d8ae8..cf17333f9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare /// Get from adding two . public static ApparentEnergy operator +(ApparentEnergy left, ApparentEnergy right) { - return new ApparentEnergy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ApparentEnergy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ApparentEnergy operator -(ApparentEnergy left, ApparentEnergy right) { - return new ApparentEnergy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ApparentEnergy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare /// Returns true if less or equal to. public static bool operator <=(ApparentEnergy left, ApparentEnergy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ApparentEnergy left, ApparentEnergy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ApparentEnergy left, ApparentEnergy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ApparentEnergy left, ApparentEnergy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(ApparentEnergy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ApparentEnergy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(ApparentEnergyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(ApparentEnergyUnit unit) /// A ApparentEnergy with the specified unit. public ApparentEnergy ToUnit(ApparentEnergyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ApparentEnergy(convertedValue, unit); } @@ -588,7 +588,7 @@ public ApparentEnergy ToUnit(ApparentEnergyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ApparentEnergyUnit unit) + private double GetValueAs(ApparentEnergyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index 3e1bb15055..50e2b65976 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -393,13 +393,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare /// Get from adding two . public static ApparentPower operator +(ApparentPower left, ApparentPower right) { - return new ApparentPower(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ApparentPower(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ApparentPower operator -(ApparentPower left, ApparentPower right) { - return new ApparentPower(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ApparentPower(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -433,25 +433,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare /// Returns true if less or equal to. public static bool operator <=(ApparentPower left, ApparentPower right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ApparentPower left, ApparentPower right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ApparentPower left, ApparentPower right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ApparentPower left, ApparentPower right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -480,7 +480,7 @@ public int CompareTo(object obj) /// public int CompareTo(ApparentPower other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -497,7 +497,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ApparentPower other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -575,7 +575,7 @@ public double As(ApparentPowerUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -588,7 +588,7 @@ public double As(ApparentPowerUnit unit) /// A ApparentPower with the specified unit. public ApparentPower ToUnit(ApparentPowerUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ApparentPower(convertedValue, unit); } @@ -602,7 +602,7 @@ public ApparentPower ToUnit(ApparentPowerUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -615,12 +615,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ApparentPowerUnit unit) + private double GetValueAs(ApparentPowerUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index 37c4ec5eb6..da9e225667 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -519,13 +519,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaUn /// Get from adding two . public static Area operator +(Area left, Area right) { - return new Area(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Area(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Area operator -(Area left, Area right) { - return new Area(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Area(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -559,25 +559,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaUn /// Returns true if less or equal to. public static bool operator <=(Area left, Area right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Area left, Area right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Area left, Area right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Area left, Area right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -606,7 +606,7 @@ public int CompareTo(object obj) /// public int CompareTo(Area other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -623,7 +623,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Area other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -701,7 +701,7 @@ public double As(AreaUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -714,7 +714,7 @@ public double As(AreaUnit unit) /// A Area with the specified unit. public Area ToUnit(AreaUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Area(convertedValue, unit); } @@ -728,7 +728,7 @@ public Area ToUnit(AreaUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -750,12 +750,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(AreaUnit unit) + private double GetValueAs(AreaUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index 404f4d5e94..adb9056ace 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -351,13 +351,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaDe /// Get from adding two . public static AreaDensity operator +(AreaDensity left, AreaDensity right) { - return new AreaDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new AreaDensity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static AreaDensity operator -(AreaDensity left, AreaDensity right) { - return new AreaDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new AreaDensity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -391,25 +391,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaDe /// Returns true if less or equal to. public static bool operator <=(AreaDensity left, AreaDensity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(AreaDensity left, AreaDensity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(AreaDensity left, AreaDensity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(AreaDensity left, AreaDensity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -438,7 +438,7 @@ public int CompareTo(object obj) /// public int CompareTo(AreaDensity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -455,7 +455,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(AreaDensity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -533,7 +533,7 @@ public double As(AreaDensityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -546,7 +546,7 @@ public double As(AreaDensityUnit unit) /// A AreaDensity with the specified unit. public AreaDensity ToUnit(AreaDensityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new AreaDensity(convertedValue, unit); } @@ -560,7 +560,7 @@ public AreaDensity ToUnit(AreaDensityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -570,12 +570,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(AreaDensityUnit unit) + private double GetValueAs(AreaDensityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index e1bda697bf..81a58292b1 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -421,13 +421,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaMo /// Get from adding two . public static AreaMomentOfInertia operator +(AreaMomentOfInertia left, AreaMomentOfInertia right) { - return new AreaMomentOfInertia(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new AreaMomentOfInertia(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static AreaMomentOfInertia operator -(AreaMomentOfInertia left, AreaMomentOfInertia right) { - return new AreaMomentOfInertia(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new AreaMomentOfInertia(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -461,25 +461,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaMo /// Returns true if less or equal to. public static bool operator <=(AreaMomentOfInertia left, AreaMomentOfInertia right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(AreaMomentOfInertia left, AreaMomentOfInertia right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(AreaMomentOfInertia left, AreaMomentOfInertia right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(AreaMomentOfInertia left, AreaMomentOfInertia right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -508,7 +508,7 @@ public int CompareTo(object obj) /// public int CompareTo(AreaMomentOfInertia other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -525,7 +525,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(AreaMomentOfInertia other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -603,7 +603,7 @@ public double As(AreaMomentOfInertiaUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -616,7 +616,7 @@ public double As(AreaMomentOfInertiaUnit unit) /// A AreaMomentOfInertia with the specified unit. public AreaMomentOfInertia ToUnit(AreaMomentOfInertiaUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new AreaMomentOfInertia(convertedValue, unit); } @@ -630,7 +630,7 @@ public AreaMomentOfInertia ToUnit(AreaMomentOfInertiaUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -645,12 +645,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(AreaMomentOfInertiaUnit unit) + private double GetValueAs(AreaMomentOfInertiaUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index 3e8e0c61ce..34a35eeffe 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -706,13 +706,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BitRat /// Get from adding two . public static BitRate operator +(BitRate left, BitRate right) { - return new BitRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new BitRate(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static BitRate operator -(BitRate left, BitRate right) { - return new BitRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new BitRate(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -746,25 +746,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BitRat /// Returns true if less or equal to. public static bool operator <=(BitRate left, BitRate right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(BitRate left, BitRate right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(BitRate left, BitRate right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(BitRate left, BitRate right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -793,7 +793,7 @@ public int CompareTo(object obj) /// public int CompareTo(BitRate other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -810,7 +810,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(BitRate other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -888,7 +888,7 @@ public double As(BitRateUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -901,7 +901,7 @@ public double As(BitRateUnit unit) /// A BitRate with the specified unit. public BitRate ToUnit(BitRateUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new BitRate(convertedValue, unit); } @@ -915,7 +915,7 @@ public BitRate ToUnit(BitRateUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private decimal AsBaseUnit() + private decimal GetValueInBaseUnit() { switch(Unit) { @@ -950,12 +950,12 @@ private decimal AsBaseUnit() } } - private decimal AsBaseNumericType(BitRateUnit unit) + private decimal GetValueAs(BitRateUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index 1e4cd006aa..13e94887ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BrakeS /// Get from adding two . public static BrakeSpecificFuelConsumption operator +(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { - return new BrakeSpecificFuelConsumption(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new BrakeSpecificFuelConsumption(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static BrakeSpecificFuelConsumption operator -(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { - return new BrakeSpecificFuelConsumption(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new BrakeSpecificFuelConsumption(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BrakeS /// Returns true if less or equal to. public static bool operator <=(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(BrakeSpecificFuelConsumption other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(BrakeSpecificFuelConsumption other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(BrakeSpecificFuelConsumptionUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(BrakeSpecificFuelConsumptionUnit unit) /// A BrakeSpecificFuelConsumption with the specified unit. public BrakeSpecificFuelConsumption ToUnit(BrakeSpecificFuelConsumptionUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new BrakeSpecificFuelConsumption(convertedValue, unit); } @@ -588,7 +588,7 @@ public BrakeSpecificFuelConsumption ToUnit(BrakeSpecificFuelConsumptionUnit unit /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(BrakeSpecificFuelConsumptionUnit unit) + private double GetValueAs(BrakeSpecificFuelConsumptionUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index fbecb8d5ad..fcc4631b36 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -438,13 +438,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Capaci /// Get from adding two . public static Capacitance operator +(Capacitance left, Capacitance right) { - return new Capacitance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Capacitance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Capacitance operator -(Capacitance left, Capacitance right) { - return new Capacitance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Capacitance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -478,25 +478,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Capaci /// Returns true if less or equal to. public static bool operator <=(Capacitance left, Capacitance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Capacitance left, Capacitance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Capacitance left, Capacitance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Capacitance left, Capacitance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -525,7 +525,7 @@ public int CompareTo(object obj) /// public int CompareTo(Capacitance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -542,7 +542,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Capacitance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -620,7 +620,7 @@ public double As(CapacitanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -633,7 +633,7 @@ public double As(CapacitanceUnit unit) /// A Capacitance with the specified unit. public Capacitance ToUnit(CapacitanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Capacitance(convertedValue, unit); } @@ -647,7 +647,7 @@ public Capacitance ToUnit(CapacitanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -663,12 +663,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(CapacitanceUnit unit) + private double GetValueAs(CapacitanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs index 4076e5b95a..09d35d9323 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Coeffi /// Get from adding two . public static CoefficientOfThermalExpansion operator +(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { - return new CoefficientOfThermalExpansion(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new CoefficientOfThermalExpansion(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static CoefficientOfThermalExpansion operator -(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { - return new CoefficientOfThermalExpansion(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new CoefficientOfThermalExpansion(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Coeffi /// Returns true if less or equal to. public static bool operator <=(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(CoefficientOfThermalExpansion other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(CoefficientOfThermalExpansion other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(CoefficientOfThermalExpansionUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(CoefficientOfThermalExpansionUnit unit) /// A CoefficientOfThermalExpansion with the specified unit. public CoefficientOfThermalExpansion ToUnit(CoefficientOfThermalExpansionUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new CoefficientOfThermalExpansion(convertedValue, unit); } @@ -588,7 +588,7 @@ public CoefficientOfThermalExpansion ToUnit(CoefficientOfThermalExpansionUnit un /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(CoefficientOfThermalExpansionUnit unit) + private double GetValueAs(CoefficientOfThermalExpansionUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index 880fc956b1..0c636e5d09 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -886,13 +886,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Densit /// Get from adding two . public static Density operator +(Density left, Density right) { - return new Density(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Density(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Density operator -(Density left, Density right) { - return new Density(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Density(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -926,25 +926,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Densit /// Returns true if less or equal to. public static bool operator <=(Density left, Density right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Density left, Density right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Density left, Density right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Density left, Density right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -973,7 +973,7 @@ public int CompareTo(object obj) /// public int CompareTo(Density other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -990,7 +990,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Density other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -1068,7 +1068,7 @@ public double As(DensityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -1081,7 +1081,7 @@ public double As(DensityUnit unit) /// A Density with the specified unit. public Density ToUnit(DensityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Density(convertedValue, unit); } @@ -1095,7 +1095,7 @@ public Density ToUnit(DensityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -1143,12 +1143,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(DensityUnit unit) + private double GetValueAs(DensityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index 31032ddab8..ab5b9dba0d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -477,13 +477,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Durati /// Get from adding two . public static Duration operator +(Duration left, Duration right) { - return new Duration(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Duration(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Duration operator -(Duration left, Duration right) { - return new Duration(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Duration(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -517,25 +517,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Durati /// Returns true if less or equal to. public static bool operator <=(Duration left, Duration right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Duration left, Duration right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Duration left, Duration right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Duration left, Duration right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -564,7 +564,7 @@ public int CompareTo(object obj) /// public int CompareTo(Duration other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -581,7 +581,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Duration other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -659,7 +659,7 @@ public double As(DurationUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -672,7 +672,7 @@ public double As(DurationUnit unit) /// A Duration with the specified unit. public Duration ToUnit(DurationUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Duration(convertedValue, unit); } @@ -686,7 +686,7 @@ public Duration ToUnit(DurationUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -705,12 +705,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(DurationUnit unit) + private double GetValueAs(DurationUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index df25a02dea..7d505df607 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -424,13 +424,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Dynami /// Get from adding two . public static DynamicViscosity operator +(DynamicViscosity left, DynamicViscosity right) { - return new DynamicViscosity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new DynamicViscosity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static DynamicViscosity operator -(DynamicViscosity left, DynamicViscosity right) { - return new DynamicViscosity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new DynamicViscosity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -464,25 +464,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Dynami /// Returns true if less or equal to. public static bool operator <=(DynamicViscosity left, DynamicViscosity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(DynamicViscosity left, DynamicViscosity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(DynamicViscosity left, DynamicViscosity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(DynamicViscosity left, DynamicViscosity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -511,7 +511,7 @@ public int CompareTo(object obj) /// public int CompareTo(DynamicViscosity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -528,7 +528,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(DynamicViscosity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -606,7 +606,7 @@ public double As(DynamicViscosityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -619,7 +619,7 @@ public double As(DynamicViscosityUnit unit) /// A DynamicViscosity with the specified unit. public DynamicViscosity ToUnit(DynamicViscosityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new DynamicViscosity(convertedValue, unit); } @@ -633,7 +633,7 @@ public DynamicViscosity ToUnit(DynamicViscosityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -648,12 +648,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(DynamicViscosityUnit unit) + private double GetValueAs(DynamicViscosityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index c9515ff510..88de01f619 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -393,13 +393,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricAdmittance operator +(ElectricAdmittance left, ElectricAdmittance right) { - return new ElectricAdmittance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricAdmittance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricAdmittance operator -(ElectricAdmittance left, ElectricAdmittance right) { - return new ElectricAdmittance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricAdmittance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -433,25 +433,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricAdmittance left, ElectricAdmittance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricAdmittance left, ElectricAdmittance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricAdmittance left, ElectricAdmittance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricAdmittance left, ElectricAdmittance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -480,7 +480,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricAdmittance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -497,7 +497,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricAdmittance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -575,7 +575,7 @@ public double As(ElectricAdmittanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -588,7 +588,7 @@ public double As(ElectricAdmittanceUnit unit) /// A ElectricAdmittance with the specified unit. public ElectricAdmittance ToUnit(ElectricAdmittanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricAdmittance(convertedValue, unit); } @@ -602,7 +602,7 @@ public ElectricAdmittance ToUnit(ElectricAdmittanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -615,12 +615,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricAdmittanceUnit unit) + private double GetValueAs(ElectricAdmittanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index c7a33053af..f35aec06eb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricCharge operator +(ElectricCharge left, ElectricCharge right) { - return new ElectricCharge(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCharge(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricCharge operator -(ElectricCharge left, ElectricCharge right) { - return new ElectricCharge(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCharge(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricCharge left, ElectricCharge right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricCharge left, ElectricCharge right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricCharge left, ElectricCharge right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricCharge left, ElectricCharge right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricCharge other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricCharge other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(ElectricChargeUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(ElectricChargeUnit unit) /// A ElectricCharge with the specified unit. public ElectricCharge ToUnit(ElectricChargeUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricCharge(convertedValue, unit); } @@ -563,7 +563,7 @@ public ElectricCharge ToUnit(ElectricChargeUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricChargeUnit unit) + private double GetValueAs(ElectricChargeUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index 4c2ceddd8e..22f30febe4 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricChargeDensity operator +(ElectricChargeDensity left, ElectricChargeDensity right) { - return new ElectricChargeDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricChargeDensity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricChargeDensity operator -(ElectricChargeDensity left, ElectricChargeDensity right) { - return new ElectricChargeDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricChargeDensity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricChargeDensity left, ElectricChargeDensity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricChargeDensity left, ElectricChargeDensity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricChargeDensity left, ElectricChargeDensity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricChargeDensity left, ElectricChargeDensity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricChargeDensity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricChargeDensity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(ElectricChargeDensityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(ElectricChargeDensityUnit unit) /// A ElectricChargeDensity with the specified unit. public ElectricChargeDensity ToUnit(ElectricChargeDensityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricChargeDensity(convertedValue, unit); } @@ -563,7 +563,7 @@ public ElectricChargeDensity ToUnit(ElectricChargeDensityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricChargeDensityUnit unit) + private double GetValueAs(ElectricChargeDensityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index 1396be33ba..cb3dc7ba60 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -382,13 +382,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricConductance operator +(ElectricConductance left, ElectricConductance right) { - return new ElectricConductance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricConductance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricConductance operator -(ElectricConductance left, ElectricConductance right) { - return new ElectricConductance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricConductance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -422,25 +422,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricConductance left, ElectricConductance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricConductance left, ElectricConductance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricConductance left, ElectricConductance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricConductance left, ElectricConductance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -469,7 +469,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricConductance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -486,7 +486,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricConductance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -564,7 +564,7 @@ public double As(ElectricConductanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -577,7 +577,7 @@ public double As(ElectricConductanceUnit unit) /// A ElectricConductance with the specified unit. public ElectricConductance ToUnit(ElectricConductanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricConductance(convertedValue, unit); } @@ -591,7 +591,7 @@ public ElectricConductance ToUnit(ElectricConductanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -603,12 +603,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricConductanceUnit unit) + private double GetValueAs(ElectricConductanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index f9e0ab5e54..f7eb31cd76 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricConductivity operator +(ElectricConductivity left, ElectricConductivity right) { - return new ElectricConductivity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricConductivity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricConductivity operator -(ElectricConductivity left, ElectricConductivity right) { - return new ElectricConductivity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricConductivity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricConductivity left, ElectricConductivity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricConductivity left, ElectricConductivity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricConductivity left, ElectricConductivity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricConductivity left, ElectricConductivity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricConductivity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricConductivity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(ElectricConductivityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(ElectricConductivityUnit unit) /// A ElectricConductivity with the specified unit. public ElectricConductivity ToUnit(ElectricConductivityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricConductivity(convertedValue, unit); } @@ -563,7 +563,7 @@ public ElectricConductivity ToUnit(ElectricConductivityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricConductivityUnit unit) + private double GetValueAs(ElectricConductivityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index 4f888f7d49..9e703bfb15 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -449,13 +449,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricCurrent operator +(ElectricCurrent left, ElectricCurrent right) { - return new ElectricCurrent(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCurrent(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricCurrent operator -(ElectricCurrent left, ElectricCurrent right) { - return new ElectricCurrent(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCurrent(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -489,25 +489,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricCurrent left, ElectricCurrent right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricCurrent left, ElectricCurrent right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricCurrent left, ElectricCurrent right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricCurrent left, ElectricCurrent right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -536,7 +536,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricCurrent other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -553,7 +553,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricCurrent other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -631,7 +631,7 @@ public double As(ElectricCurrentUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -644,7 +644,7 @@ public double As(ElectricCurrentUnit unit) /// A ElectricCurrent with the specified unit. public ElectricCurrent ToUnit(ElectricCurrentUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricCurrent(convertedValue, unit); } @@ -658,7 +658,7 @@ public ElectricCurrent ToUnit(ElectricCurrentUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -675,12 +675,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricCurrentUnit unit) + private double GetValueAs(ElectricCurrentUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index 49aec14988..3d2bfb837a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricCurrentDensity operator +(ElectricCurrentDensity left, ElectricCurrentDensity right) { - return new ElectricCurrentDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCurrentDensity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricCurrentDensity operator -(ElectricCurrentDensity left, ElectricCurrentDensity right) { - return new ElectricCurrentDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCurrentDensity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricCurrentDensity left, ElectricCurrentDensity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricCurrentDensity left, ElectricCurrentDensity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricCurrentDensity left, ElectricCurrentDensity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricCurrentDensity left, ElectricCurrentDensity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricCurrentDensity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricCurrentDensity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(ElectricCurrentDensityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(ElectricCurrentDensityUnit unit) /// A ElectricCurrentDensity with the specified unit. public ElectricCurrentDensity ToUnit(ElectricCurrentDensityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricCurrentDensity(convertedValue, unit); } @@ -563,7 +563,7 @@ public ElectricCurrentDensity ToUnit(ElectricCurrentDensityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricCurrentDensityUnit unit) + private double GetValueAs(ElectricCurrentDensityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index d939f4b8cd..affd80e498 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -351,13 +351,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricCurrentGradient operator +(ElectricCurrentGradient left, ElectricCurrentGradient right) { - return new ElectricCurrentGradient(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCurrentGradient(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricCurrentGradient operator -(ElectricCurrentGradient left, ElectricCurrentGradient right) { - return new ElectricCurrentGradient(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricCurrentGradient(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -391,25 +391,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricCurrentGradient left, ElectricCurrentGradient right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricCurrentGradient left, ElectricCurrentGradient right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricCurrentGradient left, ElectricCurrentGradient right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricCurrentGradient left, ElectricCurrentGradient right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -438,7 +438,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricCurrentGradient other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -455,7 +455,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricCurrentGradient other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -533,7 +533,7 @@ public double As(ElectricCurrentGradientUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -546,7 +546,7 @@ public double As(ElectricCurrentGradientUnit unit) /// A ElectricCurrentGradient with the specified unit. public ElectricCurrentGradient ToUnit(ElectricCurrentGradientUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricCurrentGradient(convertedValue, unit); } @@ -560,7 +560,7 @@ public ElectricCurrentGradient ToUnit(ElectricCurrentGradientUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -570,12 +570,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricCurrentGradientUnit unit) + private double GetValueAs(ElectricCurrentGradientUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index 9006f4da65..c4723ef65f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricField operator +(ElectricField left, ElectricField right) { - return new ElectricField(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricField(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricField operator -(ElectricField left, ElectricField right) { - return new ElectricField(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricField(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricField left, ElectricField right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricField left, ElectricField right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricField left, ElectricField right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricField left, ElectricField right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricField other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricField other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(ElectricFieldUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(ElectricFieldUnit unit) /// A ElectricField with the specified unit. public ElectricField ToUnit(ElectricFieldUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricField(convertedValue, unit); } @@ -563,7 +563,7 @@ public ElectricField ToUnit(ElectricFieldUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricFieldUnit unit) + private double GetValueAs(ElectricFieldUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index 53ac4b7456..62ba490b92 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -396,13 +396,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricInductance operator +(ElectricInductance left, ElectricInductance right) { - return new ElectricInductance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricInductance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricInductance operator -(ElectricInductance left, ElectricInductance right) { - return new ElectricInductance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricInductance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -436,25 +436,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricInductance left, ElectricInductance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricInductance left, ElectricInductance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricInductance left, ElectricInductance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricInductance left, ElectricInductance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -483,7 +483,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricInductance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -500,7 +500,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricInductance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -578,7 +578,7 @@ public double As(ElectricInductanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -591,7 +591,7 @@ public double As(ElectricInductanceUnit unit) /// A ElectricInductance with the specified unit. public ElectricInductance ToUnit(ElectricInductanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricInductance(convertedValue, unit); } @@ -605,7 +605,7 @@ public ElectricInductance ToUnit(ElectricInductanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -618,12 +618,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricInductanceUnit unit) + private double GetValueAs(ElectricInductanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index c5b442e5ee..58fd893ce3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -407,13 +407,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricPotential operator +(ElectricPotential left, ElectricPotential right) { - return new ElectricPotential(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricPotential(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricPotential operator -(ElectricPotential left, ElectricPotential right) { - return new ElectricPotential(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricPotential(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -447,25 +447,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricPotential left, ElectricPotential right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricPotential left, ElectricPotential right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricPotential left, ElectricPotential right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricPotential left, ElectricPotential right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -494,7 +494,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricPotential other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -511,7 +511,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricPotential other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -589,7 +589,7 @@ public double As(ElectricPotentialUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -602,7 +602,7 @@ public double As(ElectricPotentialUnit unit) /// A ElectricPotential with the specified unit. public ElectricPotential ToUnit(ElectricPotentialUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricPotential(convertedValue, unit); } @@ -616,7 +616,7 @@ public ElectricPotential ToUnit(ElectricPotentialUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -630,12 +630,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricPotentialUnit unit) + private double GetValueAs(ElectricPotentialUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index a5ec184fe5..6bf7b46c8e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -407,13 +407,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricPotentialAc operator +(ElectricPotentialAc left, ElectricPotentialAc right) { - return new ElectricPotentialAc(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricPotentialAc(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricPotentialAc operator -(ElectricPotentialAc left, ElectricPotentialAc right) { - return new ElectricPotentialAc(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricPotentialAc(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -447,25 +447,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricPotentialAc left, ElectricPotentialAc right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricPotentialAc left, ElectricPotentialAc right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricPotentialAc left, ElectricPotentialAc right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricPotentialAc left, ElectricPotentialAc right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -494,7 +494,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricPotentialAc other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -511,7 +511,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricPotentialAc other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -589,7 +589,7 @@ public double As(ElectricPotentialAcUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -602,7 +602,7 @@ public double As(ElectricPotentialAcUnit unit) /// A ElectricPotentialAc with the specified unit. public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricPotentialAc(convertedValue, unit); } @@ -616,7 +616,7 @@ public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -630,12 +630,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricPotentialAcUnit unit) + private double GetValueAs(ElectricPotentialAcUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index bf7d9c94eb..ce14eaf880 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -407,13 +407,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricPotentialDc operator +(ElectricPotentialDc left, ElectricPotentialDc right) { - return new ElectricPotentialDc(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricPotentialDc(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricPotentialDc operator -(ElectricPotentialDc left, ElectricPotentialDc right) { - return new ElectricPotentialDc(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricPotentialDc(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -447,25 +447,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricPotentialDc left, ElectricPotentialDc right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricPotentialDc left, ElectricPotentialDc right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricPotentialDc left, ElectricPotentialDc right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricPotentialDc left, ElectricPotentialDc right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -494,7 +494,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricPotentialDc other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -511,7 +511,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricPotentialDc other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -589,7 +589,7 @@ public double As(ElectricPotentialDcUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -602,7 +602,7 @@ public double As(ElectricPotentialDcUnit unit) /// A ElectricPotentialDc with the specified unit. public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricPotentialDc(convertedValue, unit); } @@ -616,7 +616,7 @@ public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -630,12 +630,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricPotentialDcUnit unit) + private double GetValueAs(ElectricPotentialDcUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index 9175f68aa4..a3949a1151 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -407,13 +407,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricResistance operator +(ElectricResistance left, ElectricResistance right) { - return new ElectricResistance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricResistance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricResistance operator -(ElectricResistance left, ElectricResistance right) { - return new ElectricResistance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricResistance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -447,25 +447,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricResistance left, ElectricResistance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricResistance left, ElectricResistance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricResistance left, ElectricResistance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricResistance left, ElectricResistance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -494,7 +494,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricResistance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -511,7 +511,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricResistance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -589,7 +589,7 @@ public double As(ElectricResistanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -602,7 +602,7 @@ public double As(ElectricResistanceUnit unit) /// A ElectricResistance with the specified unit. public ElectricResistance ToUnit(ElectricResistanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricResistance(convertedValue, unit); } @@ -616,7 +616,7 @@ public ElectricResistance ToUnit(ElectricResistanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -630,12 +630,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricResistanceUnit unit) + private double GetValueAs(ElectricResistanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index 7e957fe687..c3c924b38f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -536,13 +536,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Get from adding two . public static ElectricResistivity operator +(ElectricResistivity left, ElectricResistivity right) { - return new ElectricResistivity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricResistivity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ElectricResistivity operator -(ElectricResistivity left, ElectricResistivity right) { - return new ElectricResistivity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ElectricResistivity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -576,25 +576,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr /// Returns true if less or equal to. public static bool operator <=(ElectricResistivity left, ElectricResistivity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ElectricResistivity left, ElectricResistivity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ElectricResistivity left, ElectricResistivity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ElectricResistivity left, ElectricResistivity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -623,7 +623,7 @@ public int CompareTo(object obj) /// public int CompareTo(ElectricResistivity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -640,7 +640,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ElectricResistivity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -718,7 +718,7 @@ public double As(ElectricResistivityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -731,7 +731,7 @@ public double As(ElectricResistivityUnit unit) /// A ElectricResistivity with the specified unit. public ElectricResistivity ToUnit(ElectricResistivityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ElectricResistivity(convertedValue, unit); } @@ -745,7 +745,7 @@ public ElectricResistivity ToUnit(ElectricResistivityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -768,12 +768,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ElectricResistivityUnit unit) + private double GetValueAs(ElectricResistivityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index 9bdd17836c..1e5378ac0f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -659,13 +659,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Energy /// Get from adding two . public static Energy operator +(Energy left, Energy right) { - return new Energy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Energy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Energy operator -(Energy left, Energy right) { - return new Energy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Energy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -699,25 +699,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Energy /// Returns true if less or equal to. public static bool operator <=(Energy left, Energy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Energy left, Energy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Energy left, Energy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Energy left, Energy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -746,7 +746,7 @@ public int CompareTo(object obj) /// public int CompareTo(Energy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -763,7 +763,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Energy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -841,7 +841,7 @@ public double As(EnergyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -854,7 +854,7 @@ public double As(EnergyUnit unit) /// A Energy with the specified unit. public Energy ToUnit(EnergyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Energy(convertedValue, unit); } @@ -868,7 +868,7 @@ public Energy ToUnit(EnergyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -900,12 +900,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(EnergyUnit unit) + private double GetValueAs(EnergyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index 44b10003e7..a55bb79908 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -435,13 +435,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Entrop /// Get from adding two . public static Entropy operator +(Entropy left, Entropy right) { - return new Entropy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Entropy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Entropy operator -(Entropy left, Entropy right) { - return new Entropy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Entropy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -475,25 +475,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Entrop /// Returns true if less or equal to. public static bool operator <=(Entropy left, Entropy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Entropy left, Entropy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Entropy left, Entropy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Entropy left, Entropy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -522,7 +522,7 @@ public int CompareTo(object obj) /// public int CompareTo(Entropy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -539,7 +539,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Entropy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -617,7 +617,7 @@ public double As(EntropyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -630,7 +630,7 @@ public double As(EntropyUnit unit) /// A Entropy with the specified unit. public Entropy ToUnit(EntropyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Entropy(convertedValue, unit); } @@ -644,7 +644,7 @@ public Entropy ToUnit(EntropyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -660,12 +660,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(EntropyUnit unit) + private double GetValueAs(EntropyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index e67d019360..ef9834f9fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -519,13 +519,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceU /// Get from adding two . public static Force operator +(Force left, Force right) { - return new Force(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Force(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Force operator -(Force left, Force right) { - return new Force(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Force(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -559,25 +559,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceU /// Returns true if less or equal to. public static bool operator <=(Force left, Force right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Force left, Force right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Force left, Force right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Force left, Force right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -606,7 +606,7 @@ public int CompareTo(object obj) /// public int CompareTo(Force other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -623,7 +623,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Force other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -701,7 +701,7 @@ public double As(ForceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -714,7 +714,7 @@ public double As(ForceUnit unit) /// A Force with the specified unit. public Force ToUnit(ForceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Force(convertedValue, unit); } @@ -728,7 +728,7 @@ public Force ToUnit(ForceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -750,12 +750,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ForceUnit unit) + private double GetValueAs(ForceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index 25a0877cbe..d8d442086b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -491,13 +491,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceC /// Get from adding two . public static ForceChangeRate operator +(ForceChangeRate left, ForceChangeRate right) { - return new ForceChangeRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ForceChangeRate(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ForceChangeRate operator -(ForceChangeRate left, ForceChangeRate right) { - return new ForceChangeRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ForceChangeRate(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -531,25 +531,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceC /// Returns true if less or equal to. public static bool operator <=(ForceChangeRate left, ForceChangeRate right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ForceChangeRate left, ForceChangeRate right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ForceChangeRate left, ForceChangeRate right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ForceChangeRate left, ForceChangeRate right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -578,7 +578,7 @@ public int CompareTo(object obj) /// public int CompareTo(ForceChangeRate other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -595,7 +595,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ForceChangeRate other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -673,7 +673,7 @@ public double As(ForceChangeRateUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -686,7 +686,7 @@ public double As(ForceChangeRateUnit unit) /// A ForceChangeRate with the specified unit. public ForceChangeRate ToUnit(ForceChangeRateUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ForceChangeRate(convertedValue, unit); } @@ -700,7 +700,7 @@ public ForceChangeRate ToUnit(ForceChangeRateUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -720,12 +720,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ForceChangeRateUnit unit) + private double GetValueAs(ForceChangeRateUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index cf92627f8d..9443d839c3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -463,13 +463,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceP /// Get from adding two . public static ForcePerLength operator +(ForcePerLength left, ForcePerLength right) { - return new ForcePerLength(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ForcePerLength(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ForcePerLength operator -(ForcePerLength left, ForcePerLength right) { - return new ForcePerLength(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ForcePerLength(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -503,25 +503,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceP /// Returns true if less or equal to. public static bool operator <=(ForcePerLength left, ForcePerLength right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ForcePerLength left, ForcePerLength right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ForcePerLength left, ForcePerLength right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ForcePerLength left, ForcePerLength right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -550,7 +550,7 @@ public int CompareTo(object obj) /// public int CompareTo(ForcePerLength other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -567,7 +567,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ForcePerLength other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -645,7 +645,7 @@ public double As(ForcePerLengthUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -658,7 +658,7 @@ public double As(ForcePerLengthUnit unit) /// A ForcePerLength with the specified unit. public ForcePerLength ToUnit(ForcePerLengthUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ForcePerLength(convertedValue, unit); } @@ -672,7 +672,7 @@ public ForcePerLength ToUnit(ForcePerLengthUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -690,12 +690,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ForcePerLengthUnit unit) + private double GetValueAs(ForcePerLengthUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index eea53375ce..d2c25b65a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -463,13 +463,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Freque /// Get from adding two . public static Frequency operator +(Frequency left, Frequency right) { - return new Frequency(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Frequency(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Frequency operator -(Frequency left, Frequency right) { - return new Frequency(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Frequency(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -503,25 +503,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Freque /// Returns true if less or equal to. public static bool operator <=(Frequency left, Frequency right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Frequency left, Frequency right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Frequency left, Frequency right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Frequency left, Frequency right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -550,7 +550,7 @@ public int CompareTo(object obj) /// public int CompareTo(Frequency other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -567,7 +567,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Frequency other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -645,7 +645,7 @@ public double As(FrequencyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -658,7 +658,7 @@ public double As(FrequencyUnit unit) /// A Frequency with the specified unit. public Frequency ToUnit(FrequencyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Frequency(convertedValue, unit); } @@ -672,7 +672,7 @@ public Frequency ToUnit(FrequencyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -690,12 +690,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(FrequencyUnit unit) + private double GetValueAs(FrequencyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index 7a267b6070..b82a837bf1 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -589,13 +589,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatFl /// Get from adding two . public static HeatFlux operator +(HeatFlux left, HeatFlux right) { - return new HeatFlux(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new HeatFlux(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static HeatFlux operator -(HeatFlux left, HeatFlux right) { - return new HeatFlux(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new HeatFlux(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -629,25 +629,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatFl /// Returns true if less or equal to. public static bool operator <=(HeatFlux left, HeatFlux right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(HeatFlux left, HeatFlux right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(HeatFlux left, HeatFlux right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(HeatFlux left, HeatFlux right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -676,7 +676,7 @@ public int CompareTo(object obj) /// public int CompareTo(HeatFlux other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -693,7 +693,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(HeatFlux other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -771,7 +771,7 @@ public double As(HeatFluxUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -784,7 +784,7 @@ public double As(HeatFluxUnit unit) /// A HeatFlux with the specified unit. public HeatFlux ToUnit(HeatFluxUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new HeatFlux(convertedValue, unit); } @@ -798,7 +798,7 @@ public HeatFlux ToUnit(HeatFluxUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -825,12 +825,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(HeatFluxUnit unit) + private double GetValueAs(HeatFluxUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index 379bca138b..a4b8677493 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -365,13 +365,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatTr /// Get from adding two . public static HeatTransferCoefficient operator +(HeatTransferCoefficient left, HeatTransferCoefficient right) { - return new HeatTransferCoefficient(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new HeatTransferCoefficient(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static HeatTransferCoefficient operator -(HeatTransferCoefficient left, HeatTransferCoefficient right) { - return new HeatTransferCoefficient(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new HeatTransferCoefficient(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -405,25 +405,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatTr /// Returns true if less or equal to. public static bool operator <=(HeatTransferCoefficient left, HeatTransferCoefficient right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(HeatTransferCoefficient left, HeatTransferCoefficient right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(HeatTransferCoefficient left, HeatTransferCoefficient right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(HeatTransferCoefficient left, HeatTransferCoefficient right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -452,7 +452,7 @@ public int CompareTo(object obj) /// public int CompareTo(HeatTransferCoefficient other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -469,7 +469,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(HeatTransferCoefficient other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -547,7 +547,7 @@ public double As(HeatTransferCoefficientUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -560,7 +560,7 @@ public double As(HeatTransferCoefficientUnit unit) /// A HeatTransferCoefficient with the specified unit. public HeatTransferCoefficient ToUnit(HeatTransferCoefficientUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new HeatTransferCoefficient(convertedValue, unit); } @@ -574,7 +574,7 @@ public HeatTransferCoefficient ToUnit(HeatTransferCoefficientUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -585,12 +585,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(HeatTransferCoefficientUnit unit) + private double GetValueAs(HeatTransferCoefficientUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index 12786090d1..6f3a79d8c3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -396,13 +396,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Illumi /// Get from adding two . public static Illuminance operator +(Illuminance left, Illuminance right) { - return new Illuminance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Illuminance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Illuminance operator -(Illuminance left, Illuminance right) { - return new Illuminance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Illuminance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -436,25 +436,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Illumi /// Returns true if less or equal to. public static bool operator <=(Illuminance left, Illuminance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Illuminance left, Illuminance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Illuminance left, Illuminance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Illuminance left, Illuminance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -483,7 +483,7 @@ public int CompareTo(object obj) /// public int CompareTo(Illuminance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -500,7 +500,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Illuminance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -578,7 +578,7 @@ public double As(IlluminanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -591,7 +591,7 @@ public double As(IlluminanceUnit unit) /// A Illuminance with the specified unit. public Illuminance ToUnit(IlluminanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Illuminance(convertedValue, unit); } @@ -605,7 +605,7 @@ public Illuminance ToUnit(IlluminanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -618,12 +618,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(IlluminanceUnit unit) + private double GetValueAs(IlluminanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index 94dfd1b689..94d490406e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -703,13 +703,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Inform /// Get from adding two . public static Information operator +(Information left, Information right) { - return new Information(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Information(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Information operator -(Information left, Information right) { - return new Information(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Information(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -743,25 +743,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Inform /// Returns true if less or equal to. public static bool operator <=(Information left, Information right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Information left, Information right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Information left, Information right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Information left, Information right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -790,7 +790,7 @@ public int CompareTo(object obj) /// public int CompareTo(Information other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -807,7 +807,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Information other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -885,7 +885,7 @@ public double As(InformationUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -898,7 +898,7 @@ public double As(InformationUnit unit) /// A Information with the specified unit. public Information ToUnit(InformationUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Information(convertedValue, unit); } @@ -912,7 +912,7 @@ public Information ToUnit(InformationUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private decimal AsBaseUnit() + private decimal GetValueInBaseUnit() { switch(Unit) { @@ -947,12 +947,12 @@ private decimal AsBaseUnit() } } - private decimal AsBaseNumericType(InformationUnit unit) + private decimal GetValueAs(InformationUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index 3188e2f0aa..ca49c88875 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -533,13 +533,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi /// Get from adding two . public static Irradiance operator +(Irradiance left, Irradiance right) { - return new Irradiance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Irradiance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Irradiance operator -(Irradiance left, Irradiance right) { - return new Irradiance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Irradiance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -573,25 +573,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi /// Returns true if less or equal to. public static bool operator <=(Irradiance left, Irradiance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Irradiance left, Irradiance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Irradiance left, Irradiance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Irradiance left, Irradiance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -620,7 +620,7 @@ public int CompareTo(object obj) /// public int CompareTo(Irradiance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -637,7 +637,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Irradiance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -715,7 +715,7 @@ public double As(IrradianceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -728,7 +728,7 @@ public double As(IrradianceUnit unit) /// A Irradiance with the specified unit. public Irradiance ToUnit(IrradianceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Irradiance(convertedValue, unit); } @@ -742,7 +742,7 @@ public Irradiance ToUnit(IrradianceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -765,12 +765,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(IrradianceUnit unit) + private double GetValueAs(IrradianceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index 29e85434e6..dfa48f5bc8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -424,13 +424,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi /// Get from adding two . public static Irradiation operator +(Irradiation left, Irradiation right) { - return new Irradiation(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Irradiation(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Irradiation operator -(Irradiation left, Irradiation right) { - return new Irradiation(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Irradiation(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -464,25 +464,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi /// Returns true if less or equal to. public static bool operator <=(Irradiation left, Irradiation right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Irradiation left, Irradiation right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Irradiation left, Irradiation right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Irradiation left, Irradiation right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -511,7 +511,7 @@ public int CompareTo(object obj) /// public int CompareTo(Irradiation other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -528,7 +528,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Irradiation other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -606,7 +606,7 @@ public double As(IrradiationUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -619,7 +619,7 @@ public double As(IrradiationUnit unit) /// A Irradiation with the specified unit. public Irradiation ToUnit(IrradiationUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Irradiation(convertedValue, unit); } @@ -633,7 +633,7 @@ public Irradiation ToUnit(IrradiationUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -648,12 +648,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(IrradiationUnit unit) + private double GetValueAs(IrradiationUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index 257179e68a..b97f487e3e 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -452,13 +452,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Kinema /// Get from adding two . public static KinematicViscosity operator +(KinematicViscosity left, KinematicViscosity right) { - return new KinematicViscosity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new KinematicViscosity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static KinematicViscosity operator -(KinematicViscosity left, KinematicViscosity right) { - return new KinematicViscosity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new KinematicViscosity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -492,25 +492,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Kinema /// Returns true if less or equal to. public static bool operator <=(KinematicViscosity left, KinematicViscosity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(KinematicViscosity left, KinematicViscosity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(KinematicViscosity left, KinematicViscosity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(KinematicViscosity left, KinematicViscosity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -539,7 +539,7 @@ public int CompareTo(object obj) /// public int CompareTo(KinematicViscosity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -556,7 +556,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(KinematicViscosity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -634,7 +634,7 @@ public double As(KinematicViscosityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -647,7 +647,7 @@ public double As(KinematicViscosityUnit unit) /// A KinematicViscosity with the specified unit. public KinematicViscosity ToUnit(KinematicViscosityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new KinematicViscosity(convertedValue, unit); } @@ -661,7 +661,7 @@ public KinematicViscosity ToUnit(KinematicViscosityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -678,12 +678,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(KinematicViscosityUnit unit) + private double GetValueAs(KinematicViscosityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index 1ffbbaeb13..0f53e92f7d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -351,13 +351,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LapseR /// Get from adding two . public static LapseRate operator +(LapseRate left, LapseRate right) { - return new LapseRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new LapseRate(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static LapseRate operator -(LapseRate left, LapseRate right) { - return new LapseRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new LapseRate(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -391,25 +391,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LapseR /// Returns true if less or equal to. public static bool operator <=(LapseRate left, LapseRate right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(LapseRate left, LapseRate right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(LapseRate left, LapseRate right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(LapseRate left, LapseRate right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -438,7 +438,7 @@ public int CompareTo(object obj) /// public int CompareTo(LapseRate other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -455,7 +455,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(LapseRate other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -533,7 +533,7 @@ public double As(LapseRateUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -546,7 +546,7 @@ public double As(LapseRateUnit unit) /// A LapseRate with the specified unit. public LapseRate ToUnit(LapseRateUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new LapseRate(convertedValue, unit); } @@ -560,7 +560,7 @@ public LapseRate ToUnit(LapseRateUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -570,12 +570,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(LapseRateUnit unit) + private double GetValueAs(LapseRateUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index 4087edce83..4302817cac 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -645,13 +645,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Length /// Get from adding two . public static Length operator +(Length left, Length right) { - return new Length(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Length(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Length operator -(Length left, Length right) { - return new Length(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Length(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -685,25 +685,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Length /// Returns true if less or equal to. public static bool operator <=(Length left, Length right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Length left, Length right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Length left, Length right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Length left, Length right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -732,7 +732,7 @@ public int CompareTo(object obj) /// public int CompareTo(Length other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -749,7 +749,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Length other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -827,7 +827,7 @@ public double As(LengthUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -840,7 +840,7 @@ public double As(LengthUnit unit) /// A Length with the specified unit. public Length ToUnit(LengthUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Length(convertedValue, unit); } @@ -854,7 +854,7 @@ public Length ToUnit(LengthUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -885,12 +885,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(LengthUnit unit) + private double GetValueAs(LengthUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index 8cc1f7fc55..11f9bcef67 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -367,7 +367,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU { // Logarithmic addition // Formula: 10*log10(10^(x/10) + 10^(y/10)) - return new Level(10*Math.Log10(Math.Pow(10, left.Value/10) + Math.Pow(10, right.AsBaseNumericType(left.Unit)/10)), left.Unit); + return new Level(10*Math.Log10(Math.Pow(10, left.Value/10) + Math.Pow(10, right.GetValueAs(left.Unit)/10)), left.Unit); } /// Get from logarithmic subtraction of two . @@ -375,7 +375,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU { // Logarithmic subtraction // Formula: 10*log10(10^(x/10) - 10^(y/10)) - return new Level(10*Math.Log10(Math.Pow(10, left.Value/10) - Math.Pow(10, right.AsBaseNumericType(left.Unit)/10)), left.Unit); + return new Level(10*Math.Log10(Math.Pow(10, left.Value/10) - Math.Pow(10, right.GetValueAs(left.Unit)/10)), left.Unit); } /// Get from logarithmic multiplication of value and . @@ -403,7 +403,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU public static double operator /(Level left, Level right) { // Logarithmic division = subtraction - return Convert.ToDouble(left.Value - right.AsBaseNumericType(left.Unit)); + return Convert.ToDouble(left.Value - right.GetValueAs(left.Unit)); } #endregion @@ -413,25 +413,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU /// Returns true if less or equal to. public static bool operator <=(Level left, Level right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Level left, Level right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Level left, Level right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Level left, Level right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -460,7 +460,7 @@ public int CompareTo(object obj) /// public int CompareTo(Level other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -477,7 +477,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Level other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -555,7 +555,7 @@ public double As(LevelUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -568,7 +568,7 @@ public double As(LevelUnit unit) /// A Level with the specified unit. public Level ToUnit(LevelUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Level(convertedValue, unit); } @@ -582,7 +582,7 @@ public Level ToUnit(LevelUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -593,12 +593,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(LevelUnit unit) + private double GetValueAs(LevelUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index de996e2362..27395dc6d1 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -382,13 +382,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Linear /// Get from adding two . public static LinearDensity operator +(LinearDensity left, LinearDensity right) { - return new LinearDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new LinearDensity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static LinearDensity operator -(LinearDensity left, LinearDensity right) { - return new LinearDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new LinearDensity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -422,25 +422,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Linear /// Returns true if less or equal to. public static bool operator <=(LinearDensity left, LinearDensity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(LinearDensity left, LinearDensity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(LinearDensity left, LinearDensity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(LinearDensity left, LinearDensity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -469,7 +469,7 @@ public int CompareTo(object obj) /// public int CompareTo(LinearDensity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -486,7 +486,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(LinearDensity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -564,7 +564,7 @@ public double As(LinearDensityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -577,7 +577,7 @@ public double As(LinearDensityUnit unit) /// A LinearDensity with the specified unit. public LinearDensity ToUnit(LinearDensityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new LinearDensity(convertedValue, unit); } @@ -591,7 +591,7 @@ public LinearDensity ToUnit(LinearDensityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -603,12 +603,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(LinearDensityUnit unit) + private double GetValueAs(LinearDensityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index f35a607a79..61c5f27d29 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino /// Get from adding two . public static LuminousFlux operator +(LuminousFlux left, LuminousFlux right) { - return new LuminousFlux(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new LuminousFlux(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static LuminousFlux operator -(LuminousFlux left, LuminousFlux right) { - return new LuminousFlux(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new LuminousFlux(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino /// Returns true if less or equal to. public static bool operator <=(LuminousFlux left, LuminousFlux right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(LuminousFlux left, LuminousFlux right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(LuminousFlux left, LuminousFlux right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(LuminousFlux left, LuminousFlux right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(LuminousFlux other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(LuminousFlux other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(LuminousFluxUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(LuminousFluxUnit unit) /// A LuminousFlux with the specified unit. public LuminousFlux ToUnit(LuminousFluxUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new LuminousFlux(convertedValue, unit); } @@ -563,7 +563,7 @@ public LuminousFlux ToUnit(LuminousFluxUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(LuminousFluxUnit unit) + private double GetValueAs(LuminousFluxUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index b882f914e5..0fac5f3e85 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino /// Get from adding two . public static LuminousIntensity operator +(LuminousIntensity left, LuminousIntensity right) { - return new LuminousIntensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new LuminousIntensity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static LuminousIntensity operator -(LuminousIntensity left, LuminousIntensity right) { - return new LuminousIntensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new LuminousIntensity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino /// Returns true if less or equal to. public static bool operator <=(LuminousIntensity left, LuminousIntensity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(LuminousIntensity left, LuminousIntensity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(LuminousIntensity left, LuminousIntensity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(LuminousIntensity left, LuminousIntensity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(LuminousIntensity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(LuminousIntensity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(LuminousIntensityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(LuminousIntensityUnit unit) /// A LuminousIntensity with the specified unit. public LuminousIntensity ToUnit(LuminousIntensityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new LuminousIntensity(convertedValue, unit); } @@ -563,7 +563,7 @@ public LuminousIntensity ToUnit(LuminousIntensityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(LuminousIntensityUnit unit) + private double GetValueAs(LuminousIntensityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index 303459d9c4..5b2a25bfb1 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -396,13 +396,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet /// Get from adding two . public static MagneticField operator +(MagneticField left, MagneticField right) { - return new MagneticField(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MagneticField(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MagneticField operator -(MagneticField left, MagneticField right) { - return new MagneticField(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MagneticField(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -436,25 +436,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet /// Returns true if less or equal to. public static bool operator <=(MagneticField left, MagneticField right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MagneticField left, MagneticField right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MagneticField left, MagneticField right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MagneticField left, MagneticField right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -483,7 +483,7 @@ public int CompareTo(object obj) /// public int CompareTo(MagneticField other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -500,7 +500,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MagneticField other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -578,7 +578,7 @@ public double As(MagneticFieldUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -591,7 +591,7 @@ public double As(MagneticFieldUnit unit) /// A MagneticField with the specified unit. public MagneticField ToUnit(MagneticFieldUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MagneticField(convertedValue, unit); } @@ -605,7 +605,7 @@ public MagneticField ToUnit(MagneticFieldUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -618,12 +618,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MagneticFieldUnit unit) + private double GetValueAs(MagneticFieldUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index b8b15c7818..2db50397c5 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet /// Get from adding two . public static MagneticFlux operator +(MagneticFlux left, MagneticFlux right) { - return new MagneticFlux(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MagneticFlux(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MagneticFlux operator -(MagneticFlux left, MagneticFlux right) { - return new MagneticFlux(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MagneticFlux(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet /// Returns true if less or equal to. public static bool operator <=(MagneticFlux left, MagneticFlux right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MagneticFlux left, MagneticFlux right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MagneticFlux left, MagneticFlux right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MagneticFlux left, MagneticFlux right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(MagneticFlux other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MagneticFlux other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(MagneticFluxUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(MagneticFluxUnit unit) /// A MagneticFlux with the specified unit. public MagneticFlux ToUnit(MagneticFluxUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MagneticFlux(convertedValue, unit); } @@ -563,7 +563,7 @@ public MagneticFlux ToUnit(MagneticFluxUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MagneticFluxUnit unit) + private double GetValueAs(MagneticFluxUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index 574b89f106..7196e316b7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet /// Get from adding two . public static Magnetization operator +(Magnetization left, Magnetization right) { - return new Magnetization(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Magnetization(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Magnetization operator -(Magnetization left, Magnetization right) { - return new Magnetization(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Magnetization(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Magnet /// Returns true if less or equal to. public static bool operator <=(Magnetization left, Magnetization right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Magnetization left, Magnetization right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Magnetization left, Magnetization right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Magnetization left, Magnetization right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(Magnetization other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Magnetization other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(MagnetizationUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(MagnetizationUnit unit) /// A Magnetization with the specified unit. public Magnetization ToUnit(MagnetizationUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Magnetization(convertedValue, unit); } @@ -563,7 +563,7 @@ public Magnetization ToUnit(MagnetizationUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MagnetizationUnit unit) + private double GetValueAs(MagnetizationUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index d4b2fa7fc3..eb890d3a00 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -659,13 +659,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassUn /// Get from adding two . public static Mass operator +(Mass left, Mass right) { - return new Mass(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Mass(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Mass operator -(Mass left, Mass right) { - return new Mass(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Mass(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -699,25 +699,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassUn /// Returns true if less or equal to. public static bool operator <=(Mass left, Mass right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Mass left, Mass right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Mass left, Mass right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Mass left, Mass right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -746,7 +746,7 @@ public int CompareTo(object obj) /// public int CompareTo(Mass other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -763,7 +763,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Mass other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -841,7 +841,7 @@ public double As(MassUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -854,7 +854,7 @@ public double As(MassUnit unit) /// A Mass with the specified unit. public Mass ToUnit(MassUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Mass(convertedValue, unit); } @@ -868,7 +868,7 @@ public Mass ToUnit(MassUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -900,12 +900,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MassUnit unit) + private double GetValueAs(MassUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index ec6ea3fa05..5f531322b9 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -771,13 +771,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassFl /// Get from adding two . public static MassFlow operator +(MassFlow left, MassFlow right) { - return new MassFlow(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MassFlow(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MassFlow operator -(MassFlow left, MassFlow right) { - return new MassFlow(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MassFlow(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -811,25 +811,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassFl /// Returns true if less or equal to. public static bool operator <=(MassFlow left, MassFlow right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MassFlow left, MassFlow right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MassFlow left, MassFlow right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MassFlow left, MassFlow right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -858,7 +858,7 @@ public int CompareTo(object obj) /// public int CompareTo(MassFlow other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -875,7 +875,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MassFlow other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -953,7 +953,7 @@ public double As(MassFlowUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -966,7 +966,7 @@ public double As(MassFlowUnit unit) /// A MassFlow with the specified unit. public MassFlow ToUnit(MassFlowUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MassFlow(convertedValue, unit); } @@ -980,7 +980,7 @@ public MassFlow ToUnit(MassFlowUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -1020,12 +1020,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MassFlowUnit unit) + private double GetValueAs(MassFlowUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index 43778a88d0..f5e78edff3 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -365,13 +365,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassFl /// Get from adding two . public static MassFlux operator +(MassFlux left, MassFlux right) { - return new MassFlux(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MassFlux(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MassFlux operator -(MassFlux left, MassFlux right) { - return new MassFlux(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MassFlux(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -405,25 +405,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassFl /// Returns true if less or equal to. public static bool operator <=(MassFlux left, MassFlux right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MassFlux left, MassFlux right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MassFlux left, MassFlux right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MassFlux left, MassFlux right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -452,7 +452,7 @@ public int CompareTo(object obj) /// public int CompareTo(MassFlux other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -469,7 +469,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MassFlux other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -547,7 +547,7 @@ public double As(MassFluxUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -560,7 +560,7 @@ public double As(MassFluxUnit unit) /// A MassFlux with the specified unit. public MassFlux ToUnit(MassFluxUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MassFlux(convertedValue, unit); } @@ -574,7 +574,7 @@ public MassFlux ToUnit(MassFluxUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -585,12 +585,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MassFluxUnit unit) + private double GetValueAs(MassFluxUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index 180fd5ead3..128db66ed6 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -729,13 +729,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassMo /// Get from adding two . public static MassMomentOfInertia operator +(MassMomentOfInertia left, MassMomentOfInertia right) { - return new MassMomentOfInertia(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MassMomentOfInertia(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MassMomentOfInertia operator -(MassMomentOfInertia left, MassMomentOfInertia right) { - return new MassMomentOfInertia(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MassMomentOfInertia(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -769,25 +769,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MassMo /// Returns true if less or equal to. public static bool operator <=(MassMomentOfInertia left, MassMomentOfInertia right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MassMomentOfInertia left, MassMomentOfInertia right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MassMomentOfInertia left, MassMomentOfInertia right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MassMomentOfInertia left, MassMomentOfInertia right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -816,7 +816,7 @@ public int CompareTo(object obj) /// public int CompareTo(MassMomentOfInertia other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -833,7 +833,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MassMomentOfInertia other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -911,7 +911,7 @@ public double As(MassMomentOfInertiaUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -924,7 +924,7 @@ public double As(MassMomentOfInertiaUnit unit) /// A MassMomentOfInertia with the specified unit. public MassMomentOfInertia ToUnit(MassMomentOfInertiaUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MassMomentOfInertia(convertedValue, unit); } @@ -938,7 +938,7 @@ public MassMomentOfInertia ToUnit(MassMomentOfInertiaUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -975,12 +975,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MassMomentOfInertiaUnit unit) + private double GetValueAs(MassMomentOfInertiaUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index 31b853d795..8f2092eceb 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarE /// Get from adding two . public static MolarEnergy operator +(MolarEnergy left, MolarEnergy right) { - return new MolarEnergy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MolarEnergy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MolarEnergy operator -(MolarEnergy left, MolarEnergy right) { - return new MolarEnergy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MolarEnergy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarE /// Returns true if less or equal to. public static bool operator <=(MolarEnergy left, MolarEnergy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MolarEnergy left, MolarEnergy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MolarEnergy left, MolarEnergy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MolarEnergy left, MolarEnergy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(MolarEnergy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MolarEnergy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(MolarEnergyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(MolarEnergyUnit unit) /// A MolarEnergy with the specified unit. public MolarEnergy ToUnit(MolarEnergyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MolarEnergy(convertedValue, unit); } @@ -588,7 +588,7 @@ public MolarEnergy ToUnit(MolarEnergyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MolarEnergyUnit unit) + private double GetValueAs(MolarEnergyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index 4992131897..9a0f1923b6 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarE /// Get from adding two . public static MolarEntropy operator +(MolarEntropy left, MolarEntropy right) { - return new MolarEntropy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MolarEntropy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MolarEntropy operator -(MolarEntropy left, MolarEntropy right) { - return new MolarEntropy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MolarEntropy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarE /// Returns true if less or equal to. public static bool operator <=(MolarEntropy left, MolarEntropy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MolarEntropy left, MolarEntropy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MolarEntropy left, MolarEntropy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MolarEntropy left, MolarEntropy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(MolarEntropy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MolarEntropy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(MolarEntropyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(MolarEntropyUnit unit) /// A MolarEntropy with the specified unit. public MolarEntropy ToUnit(MolarEntropyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MolarEntropy(convertedValue, unit); } @@ -588,7 +588,7 @@ public MolarEntropy ToUnit(MolarEntropyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MolarEntropyUnit unit) + private double GetValueAs(MolarEntropyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index 480a3ea3ad..ed5ab6b531 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -505,13 +505,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarM /// Get from adding two . public static MolarMass operator +(MolarMass left, MolarMass right) { - return new MolarMass(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new MolarMass(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static MolarMass operator -(MolarMass left, MolarMass right) { - return new MolarMass(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new MolarMass(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -545,25 +545,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out MolarM /// Returns true if less or equal to. public static bool operator <=(MolarMass left, MolarMass right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(MolarMass left, MolarMass right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(MolarMass left, MolarMass right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(MolarMass left, MolarMass right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -592,7 +592,7 @@ public int CompareTo(object obj) /// public int CompareTo(MolarMass other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -609,7 +609,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(MolarMass other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -687,7 +687,7 @@ public double As(MolarMassUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -700,7 +700,7 @@ public double As(MolarMassUnit unit) /// A MolarMass with the specified unit. public MolarMass ToUnit(MolarMassUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new MolarMass(convertedValue, unit); } @@ -714,7 +714,7 @@ public MolarMass ToUnit(MolarMassUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -735,12 +735,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MolarMassUnit unit) + private double GetValueAs(MolarMassUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index d495115d3a..e5af799817 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -452,13 +452,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Molari /// Get from adding two . public static Molarity operator +(Molarity left, Molarity right) { - return new Molarity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Molarity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Molarity operator -(Molarity left, Molarity right) { - return new Molarity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Molarity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -492,25 +492,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Molari /// Returns true if less or equal to. public static bool operator <=(Molarity left, Molarity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Molarity left, Molarity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Molarity left, Molarity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Molarity left, Molarity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -539,7 +539,7 @@ public int CompareTo(object obj) /// public int CompareTo(Molarity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -556,7 +556,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Molarity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -634,7 +634,7 @@ public double As(MolarityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -647,7 +647,7 @@ public double As(MolarityUnit unit) /// A Molarity with the specified unit. public Molarity ToUnit(MolarityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Molarity(convertedValue, unit); } @@ -661,7 +661,7 @@ public Molarity ToUnit(MolarityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -678,12 +678,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(MolarityUnit unit) + private double GetValueAs(MolarityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index 129eba6016..0ddf4cb1a5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Permea /// Get from adding two . public static Permeability operator +(Permeability left, Permeability right) { - return new Permeability(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Permeability(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Permeability operator -(Permeability left, Permeability right) { - return new Permeability(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Permeability(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Permea /// Returns true if less or equal to. public static bool operator <=(Permeability left, Permeability right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Permeability left, Permeability right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Permeability left, Permeability right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Permeability left, Permeability right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(Permeability other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Permeability other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(PermeabilityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(PermeabilityUnit unit) /// A Permeability with the specified unit. public Permeability ToUnit(PermeabilityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Permeability(convertedValue, unit); } @@ -563,7 +563,7 @@ public Permeability ToUnit(PermeabilityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(PermeabilityUnit unit) + private double GetValueAs(PermeabilityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index a855fe78dc..513ba76f1b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Permit /// Get from adding two . public static Permittivity operator +(Permittivity left, Permittivity right) { - return new Permittivity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Permittivity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Permittivity operator -(Permittivity left, Permittivity right) { - return new Permittivity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Permittivity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Permit /// Returns true if less or equal to. public static bool operator <=(Permittivity left, Permittivity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Permittivity left, Permittivity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Permittivity left, Permittivity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Permittivity left, Permittivity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(Permittivity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Permittivity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(PermittivityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(PermittivityUnit unit) /// A Permittivity with the specified unit. public Permittivity ToUnit(PermittivityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Permittivity(convertedValue, unit); } @@ -563,7 +563,7 @@ public Permittivity ToUnit(PermittivityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(PermittivityUnit unit) + private double GetValueAs(PermittivityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index 3d05be4a37..90ed802061 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -619,13 +619,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerU /// Get from adding two . public static Power operator +(Power left, Power right) { - return new Power(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Power(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Power operator -(Power left, Power right) { - return new Power(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Power(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -659,25 +659,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerU /// Returns true if less or equal to. public static bool operator <=(Power left, Power right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Power left, Power right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Power left, Power right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Power left, Power right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -706,7 +706,7 @@ public int CompareTo(object obj) /// public int CompareTo(Power other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -723,7 +723,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Power other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -801,7 +801,7 @@ public double As(PowerUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -814,7 +814,7 @@ public double As(PowerUnit unit) /// A Power with the specified unit. public Power ToUnit(PowerUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Power(convertedValue, unit); } @@ -828,7 +828,7 @@ public Power ToUnit(PowerUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private decimal AsBaseUnit() + private decimal GetValueInBaseUnit() { switch(Unit) { @@ -857,12 +857,12 @@ private decimal AsBaseUnit() } } - private decimal AsBaseNumericType(PowerUnit unit) + private decimal GetValueAs(PowerUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index 54c7acfaa3..362b7a4851 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -953,13 +953,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerD /// Get from adding two . public static PowerDensity operator +(PowerDensity left, PowerDensity right) { - return new PowerDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new PowerDensity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static PowerDensity operator -(PowerDensity left, PowerDensity right) { - return new PowerDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new PowerDensity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -993,25 +993,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerD /// Returns true if less or equal to. public static bool operator <=(PowerDensity left, PowerDensity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(PowerDensity left, PowerDensity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(PowerDensity left, PowerDensity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(PowerDensity left, PowerDensity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -1040,7 +1040,7 @@ public int CompareTo(object obj) /// public int CompareTo(PowerDensity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -1057,7 +1057,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(PowerDensity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -1135,7 +1135,7 @@ public double As(PowerDensityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -1148,7 +1148,7 @@ public double As(PowerDensityUnit unit) /// A PowerDensity with the specified unit. public PowerDensity ToUnit(PowerDensityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new PowerDensity(convertedValue, unit); } @@ -1162,7 +1162,7 @@ public PowerDensity ToUnit(PowerDensityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -1215,12 +1215,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(PowerDensityUnit unit) + private double GetValueAs(PowerDensityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index d466a60fc7..b9e934a9fd 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -367,7 +367,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerR { // Logarithmic addition // Formula: 10*log10(10^(x/10) + 10^(y/10)) - return new PowerRatio(10*Math.Log10(Math.Pow(10, left.Value/10) + Math.Pow(10, right.AsBaseNumericType(left.Unit)/10)), left.Unit); + return new PowerRatio(10*Math.Log10(Math.Pow(10, left.Value/10) + Math.Pow(10, right.GetValueAs(left.Unit)/10)), left.Unit); } /// Get from logarithmic subtraction of two . @@ -375,7 +375,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerR { // Logarithmic subtraction // Formula: 10*log10(10^(x/10) - 10^(y/10)) - return new PowerRatio(10*Math.Log10(Math.Pow(10, left.Value/10) - Math.Pow(10, right.AsBaseNumericType(left.Unit)/10)), left.Unit); + return new PowerRatio(10*Math.Log10(Math.Pow(10, left.Value/10) - Math.Pow(10, right.GetValueAs(left.Unit)/10)), left.Unit); } /// Get from logarithmic multiplication of value and . @@ -403,7 +403,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerR public static double operator /(PowerRatio left, PowerRatio right) { // Logarithmic division = subtraction - return Convert.ToDouble(left.Value - right.AsBaseNumericType(left.Unit)); + return Convert.ToDouble(left.Value - right.GetValueAs(left.Unit)); } #endregion @@ -413,25 +413,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out PowerR /// Returns true if less or equal to. public static bool operator <=(PowerRatio left, PowerRatio right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(PowerRatio left, PowerRatio right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(PowerRatio left, PowerRatio right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(PowerRatio left, PowerRatio right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -460,7 +460,7 @@ public int CompareTo(object obj) /// public int CompareTo(PowerRatio other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -477,7 +477,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(PowerRatio other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -555,7 +555,7 @@ public double As(PowerRatioUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -568,7 +568,7 @@ public double As(PowerRatioUnit unit) /// A PowerRatio with the specified unit. public PowerRatio ToUnit(PowerRatioUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new PowerRatio(convertedValue, unit); } @@ -582,7 +582,7 @@ public PowerRatio ToUnit(PowerRatioUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -593,12 +593,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(PowerRatioUnit unit) + private double GetValueAs(PowerRatioUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index fe11e822e2..3c5537ccf4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -925,13 +925,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Pressu /// Get from adding two . public static Pressure operator +(Pressure left, Pressure right) { - return new Pressure(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Pressure(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Pressure operator -(Pressure left, Pressure right) { - return new Pressure(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Pressure(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -965,25 +965,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Pressu /// Returns true if less or equal to. public static bool operator <=(Pressure left, Pressure right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Pressure left, Pressure right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Pressure left, Pressure right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Pressure left, Pressure right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -1012,7 +1012,7 @@ public int CompareTo(object obj) /// public int CompareTo(Pressure other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -1029,7 +1029,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Pressure other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -1107,7 +1107,7 @@ public double As(PressureUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -1120,7 +1120,7 @@ public double As(PressureUnit unit) /// A Pressure with the specified unit. public Pressure ToUnit(PressureUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Pressure(convertedValue, unit); } @@ -1134,7 +1134,7 @@ public Pressure ToUnit(PressureUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -1185,12 +1185,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(PressureUnit unit) + private double GetValueAs(PressureUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index 5fbc74ba44..686c1b7c4b 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -435,13 +435,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Pressu /// Get from adding two . public static PressureChangeRate operator +(PressureChangeRate left, PressureChangeRate right) { - return new PressureChangeRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new PressureChangeRate(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static PressureChangeRate operator -(PressureChangeRate left, PressureChangeRate right) { - return new PressureChangeRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new PressureChangeRate(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -475,25 +475,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Pressu /// Returns true if less or equal to. public static bool operator <=(PressureChangeRate left, PressureChangeRate right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(PressureChangeRate left, PressureChangeRate right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(PressureChangeRate left, PressureChangeRate right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(PressureChangeRate left, PressureChangeRate right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -522,7 +522,7 @@ public int CompareTo(object obj) /// public int CompareTo(PressureChangeRate other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -539,7 +539,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(PressureChangeRate other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -617,7 +617,7 @@ public double As(PressureChangeRateUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -630,7 +630,7 @@ public double As(PressureChangeRateUnit unit) /// A PressureChangeRate with the specified unit. public PressureChangeRate ToUnit(PressureChangeRateUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new PressureChangeRate(convertedValue, unit); } @@ -644,7 +644,7 @@ public PressureChangeRate ToUnit(PressureChangeRateUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -660,12 +660,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(PressureChangeRateUnit unit) + private double GetValueAs(PressureChangeRateUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index 3a7f282ccb..8a5ef36b79 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -421,13 +421,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out RatioU /// Get from adding two . public static Ratio operator +(Ratio left, Ratio right) { - return new Ratio(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Ratio(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Ratio operator -(Ratio left, Ratio right) { - return new Ratio(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Ratio(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -461,25 +461,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out RatioU /// Returns true if less or equal to. public static bool operator <=(Ratio left, Ratio right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Ratio left, Ratio right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Ratio left, Ratio right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Ratio left, Ratio right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -508,7 +508,7 @@ public int CompareTo(object obj) /// public int CompareTo(Ratio other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -525,7 +525,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Ratio other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -603,7 +603,7 @@ public double As(RatioUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -616,7 +616,7 @@ public double As(RatioUnit unit) /// A Ratio with the specified unit. public Ratio ToUnit(RatioUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Ratio(convertedValue, unit); } @@ -630,7 +630,7 @@ public Ratio ToUnit(RatioUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -645,12 +645,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(RatioUnit unit) + private double GetValueAs(RatioUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index 1e90b04e81..24b393344f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Reacti /// Get from adding two . public static ReactiveEnergy operator +(ReactiveEnergy left, ReactiveEnergy right) { - return new ReactiveEnergy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ReactiveEnergy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ReactiveEnergy operator -(ReactiveEnergy left, ReactiveEnergy right) { - return new ReactiveEnergy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ReactiveEnergy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Reacti /// Returns true if less or equal to. public static bool operator <=(ReactiveEnergy left, ReactiveEnergy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ReactiveEnergy left, ReactiveEnergy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ReactiveEnergy left, ReactiveEnergy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ReactiveEnergy left, ReactiveEnergy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(ReactiveEnergy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ReactiveEnergy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(ReactiveEnergyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(ReactiveEnergyUnit unit) /// A ReactiveEnergy with the specified unit. public ReactiveEnergy ToUnit(ReactiveEnergyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ReactiveEnergy(convertedValue, unit); } @@ -588,7 +588,7 @@ public ReactiveEnergy ToUnit(ReactiveEnergyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ReactiveEnergyUnit unit) + private double GetValueAs(ReactiveEnergyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index d592f5ea84..187f383189 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -393,13 +393,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Reacti /// Get from adding two . public static ReactivePower operator +(ReactivePower left, ReactivePower right) { - return new ReactivePower(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ReactivePower(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ReactivePower operator -(ReactivePower left, ReactivePower right) { - return new ReactivePower(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ReactivePower(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -433,25 +433,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Reacti /// Returns true if less or equal to. public static bool operator <=(ReactivePower left, ReactivePower right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ReactivePower left, ReactivePower right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ReactivePower left, ReactivePower right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ReactivePower left, ReactivePower right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -480,7 +480,7 @@ public int CompareTo(object obj) /// public int CompareTo(ReactivePower other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -497,7 +497,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ReactivePower other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -575,7 +575,7 @@ public double As(ReactivePowerUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -588,7 +588,7 @@ public double As(ReactivePowerUnit unit) /// A ReactivePower with the specified unit. public ReactivePower ToUnit(ReactivePowerUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ReactivePower(convertedValue, unit); } @@ -602,7 +602,7 @@ public ReactivePower ToUnit(ReactivePowerUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -615,12 +615,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ReactivePowerUnit unit) + private double GetValueAs(ReactivePowerUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index 2e3e75aaa6..f5ceb60364 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Get from adding two . public static RotationalAcceleration operator +(RotationalAcceleration left, RotationalAcceleration right) { - return new RotationalAcceleration(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalAcceleration(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static RotationalAcceleration operator -(RotationalAcceleration left, RotationalAcceleration right) { - return new RotationalAcceleration(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalAcceleration(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Returns true if less or equal to. public static bool operator <=(RotationalAcceleration left, RotationalAcceleration right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(RotationalAcceleration left, RotationalAcceleration right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(RotationalAcceleration left, RotationalAcceleration right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(RotationalAcceleration left, RotationalAcceleration right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(RotationalAcceleration other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(RotationalAcceleration other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(RotationalAccelerationUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(RotationalAccelerationUnit unit) /// A RotationalAcceleration with the specified unit. public RotationalAcceleration ToUnit(RotationalAccelerationUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new RotationalAcceleration(convertedValue, unit); } @@ -588,7 +588,7 @@ public RotationalAcceleration ToUnit(RotationalAccelerationUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(RotationalAccelerationUnit unit) + private double GetValueAs(RotationalAccelerationUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index 1844dace9a..22547f3fdf 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -519,13 +519,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Get from adding two . public static RotationalSpeed operator +(RotationalSpeed left, RotationalSpeed right) { - return new RotationalSpeed(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalSpeed(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static RotationalSpeed operator -(RotationalSpeed left, RotationalSpeed right) { - return new RotationalSpeed(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalSpeed(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -559,25 +559,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Returns true if less or equal to. public static bool operator <=(RotationalSpeed left, RotationalSpeed right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(RotationalSpeed left, RotationalSpeed right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(RotationalSpeed left, RotationalSpeed right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(RotationalSpeed left, RotationalSpeed right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -606,7 +606,7 @@ public int CompareTo(object obj) /// public int CompareTo(RotationalSpeed other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -623,7 +623,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(RotationalSpeed other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -701,7 +701,7 @@ public double As(RotationalSpeedUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -714,7 +714,7 @@ public double As(RotationalSpeedUnit unit) /// A RotationalSpeed with the specified unit. public RotationalSpeed ToUnit(RotationalSpeedUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new RotationalSpeed(convertedValue, unit); } @@ -728,7 +728,7 @@ public RotationalSpeed ToUnit(RotationalSpeedUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -750,12 +750,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(RotationalSpeedUnit unit) + private double GetValueAs(RotationalSpeedUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index abedfb2c68..e8bf6a662e 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Get from adding two . public static RotationalStiffness operator +(RotationalStiffness left, RotationalStiffness right) { - return new RotationalStiffness(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalStiffness(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static RotationalStiffness operator -(RotationalStiffness left, RotationalStiffness right) { - return new RotationalStiffness(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalStiffness(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Returns true if less or equal to. public static bool operator <=(RotationalStiffness left, RotationalStiffness right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(RotationalStiffness left, RotationalStiffness right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(RotationalStiffness left, RotationalStiffness right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(RotationalStiffness left, RotationalStiffness right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(RotationalStiffness other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(RotationalStiffness other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(RotationalStiffnessUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(RotationalStiffnessUnit unit) /// A RotationalStiffness with the specified unit. public RotationalStiffness ToUnit(RotationalStiffnessUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new RotationalStiffness(convertedValue, unit); } @@ -588,7 +588,7 @@ public RotationalStiffness ToUnit(RotationalStiffnessUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(RotationalStiffnessUnit unit) + private double GetValueAs(RotationalStiffnessUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index e30673ef5a..a1574a87bd 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Get from adding two . public static RotationalStiffnessPerLength operator +(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { - return new RotationalStiffnessPerLength(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalStiffnessPerLength(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static RotationalStiffnessPerLength operator -(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { - return new RotationalStiffnessPerLength(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new RotationalStiffnessPerLength(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Rotati /// Returns true if less or equal to. public static bool operator <=(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(RotationalStiffnessPerLength left, RotationalStiffnessPerLength right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(RotationalStiffnessPerLength other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(RotationalStiffnessPerLength other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(RotationalStiffnessPerLengthUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(RotationalStiffnessPerLengthUnit unit) /// A RotationalStiffnessPerLength with the specified unit. public RotationalStiffnessPerLength ToUnit(RotationalStiffnessPerLengthUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new RotationalStiffnessPerLength(convertedValue, unit); } @@ -588,7 +588,7 @@ public RotationalStiffnessPerLength ToUnit(RotationalStiffnessPerLengthUnit unit /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(RotationalStiffnessPerLengthUnit unit) + private double GetValueAs(RotationalStiffnessPerLengthUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index ebab308d33..49ac06e19b 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -354,13 +354,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out SolidA /// Get from adding two . public static SolidAngle operator +(SolidAngle left, SolidAngle right) { - return new SolidAngle(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new SolidAngle(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static SolidAngle operator -(SolidAngle left, SolidAngle right) { - return new SolidAngle(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new SolidAngle(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -394,25 +394,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out SolidA /// Returns true if less or equal to. public static bool operator <=(SolidAngle left, SolidAngle right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(SolidAngle left, SolidAngle right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(SolidAngle left, SolidAngle right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(SolidAngle left, SolidAngle right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -441,7 +441,7 @@ public int CompareTo(object obj) /// public int CompareTo(SolidAngle other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -458,7 +458,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(SolidAngle other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -536,7 +536,7 @@ public double As(SolidAngleUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -549,7 +549,7 @@ public double As(SolidAngleUnit unit) /// A SolidAngle with the specified unit. public SolidAngle ToUnit(SolidAngleUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new SolidAngle(convertedValue, unit); } @@ -563,7 +563,7 @@ public SolidAngle ToUnit(SolidAngleUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -573,12 +573,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(SolidAngleUnit unit) + private double GetValueAs(SolidAngleUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index 265f38a41c..eae20e3e62 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -466,13 +466,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Get from adding two . public static SpecificEnergy operator +(SpecificEnergy left, SpecificEnergy right) { - return new SpecificEnergy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificEnergy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static SpecificEnergy operator -(SpecificEnergy left, SpecificEnergy right) { - return new SpecificEnergy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificEnergy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -506,25 +506,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Returns true if less or equal to. public static bool operator <=(SpecificEnergy left, SpecificEnergy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(SpecificEnergy left, SpecificEnergy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(SpecificEnergy left, SpecificEnergy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(SpecificEnergy left, SpecificEnergy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -553,7 +553,7 @@ public int CompareTo(object obj) /// public int CompareTo(SpecificEnergy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -570,7 +570,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(SpecificEnergy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -648,7 +648,7 @@ public double As(SpecificEnergyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -661,7 +661,7 @@ public double As(SpecificEnergyUnit unit) /// A SpecificEnergy with the specified unit. public SpecificEnergy ToUnit(SpecificEnergyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new SpecificEnergy(convertedValue, unit); } @@ -675,7 +675,7 @@ public SpecificEnergy ToUnit(SpecificEnergyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -693,12 +693,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(SpecificEnergyUnit unit) + private double GetValueAs(SpecificEnergyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index c3ac785438..3f4a3c52de 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -449,13 +449,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Get from adding two . public static SpecificEntropy operator +(SpecificEntropy left, SpecificEntropy right) { - return new SpecificEntropy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificEntropy(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static SpecificEntropy operator -(SpecificEntropy left, SpecificEntropy right) { - return new SpecificEntropy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificEntropy(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -489,25 +489,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Returns true if less or equal to. public static bool operator <=(SpecificEntropy left, SpecificEntropy right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(SpecificEntropy left, SpecificEntropy right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(SpecificEntropy left, SpecificEntropy right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(SpecificEntropy left, SpecificEntropy right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -536,7 +536,7 @@ public int CompareTo(object obj) /// public int CompareTo(SpecificEntropy other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -553,7 +553,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(SpecificEntropy other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -631,7 +631,7 @@ public double As(SpecificEntropyUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -644,7 +644,7 @@ public double As(SpecificEntropyUnit unit) /// A SpecificEntropy with the specified unit. public SpecificEntropy ToUnit(SpecificEntropyUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new SpecificEntropy(convertedValue, unit); } @@ -658,7 +658,7 @@ public SpecificEntropy ToUnit(SpecificEntropyUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -675,12 +675,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(SpecificEntropyUnit unit) + private double GetValueAs(SpecificEntropyUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index aa44796f82..b3dacd4129 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -379,13 +379,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Get from adding two . public static SpecificVolume operator +(SpecificVolume left, SpecificVolume right) { - return new SpecificVolume(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificVolume(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static SpecificVolume operator -(SpecificVolume left, SpecificVolume right) { - return new SpecificVolume(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificVolume(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -419,25 +419,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Returns true if less or equal to. public static bool operator <=(SpecificVolume left, SpecificVolume right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(SpecificVolume left, SpecificVolume right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(SpecificVolume left, SpecificVolume right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(SpecificVolume left, SpecificVolume right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -466,7 +466,7 @@ public int CompareTo(object obj) /// public int CompareTo(SpecificVolume other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -483,7 +483,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(SpecificVolume other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -561,7 +561,7 @@ public double As(SpecificVolumeUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -574,7 +574,7 @@ public double As(SpecificVolumeUnit unit) /// A SpecificVolume with the specified unit. public SpecificVolume ToUnit(SpecificVolumeUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new SpecificVolume(convertedValue, unit); } @@ -588,7 +588,7 @@ public SpecificVolume ToUnit(SpecificVolumeUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -600,12 +600,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(SpecificVolumeUnit unit) + private double GetValueAs(SpecificVolumeUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index bf487f6e32..778d03c6e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -578,13 +578,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Get from adding two . public static SpecificWeight operator +(SpecificWeight left, SpecificWeight right) { - return new SpecificWeight(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificWeight(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static SpecificWeight operator -(SpecificWeight left, SpecificWeight right) { - return new SpecificWeight(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new SpecificWeight(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -618,25 +618,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Specif /// Returns true if less or equal to. public static bool operator <=(SpecificWeight left, SpecificWeight right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(SpecificWeight left, SpecificWeight right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(SpecificWeight left, SpecificWeight right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(SpecificWeight left, SpecificWeight right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -665,7 +665,7 @@ public int CompareTo(object obj) /// public int CompareTo(SpecificWeight other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -682,7 +682,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(SpecificWeight other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -760,7 +760,7 @@ public double As(SpecificWeightUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -773,7 +773,7 @@ public double As(SpecificWeightUnit unit) /// A SpecificWeight with the specified unit. public SpecificWeight ToUnit(SpecificWeightUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new SpecificWeight(convertedValue, unit); } @@ -787,7 +787,7 @@ public SpecificWeight ToUnit(SpecificWeightUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -813,12 +813,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(SpecificWeightUnit unit) + private double GetValueAs(SpecificWeightUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index b403426fbc..beaa2d819b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -785,13 +785,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out SpeedU /// Get from adding two . public static Speed operator +(Speed left, Speed right) { - return new Speed(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Speed(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Speed operator -(Speed left, Speed right) { - return new Speed(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Speed(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -825,25 +825,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out SpeedU /// Returns true if less or equal to. public static bool operator <=(Speed left, Speed right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Speed left, Speed right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Speed left, Speed right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Speed left, Speed right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -872,7 +872,7 @@ public int CompareTo(object obj) /// public int CompareTo(Speed other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -889,7 +889,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Speed other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -967,7 +967,7 @@ public double As(SpeedUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -980,7 +980,7 @@ public double As(SpeedUnit unit) /// A Speed with the specified unit. public Speed ToUnit(SpeedUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Speed(convertedValue, unit); } @@ -994,7 +994,7 @@ public Speed ToUnit(SpeedUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -1035,12 +1035,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(SpeedUnit unit) + private double GetValueAs(SpeedUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index 5d1b8c5e46..4df76260f5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -443,25 +443,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper /// Returns true if less or equal to. public static bool operator <=(Temperature left, Temperature right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Temperature left, Temperature right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Temperature left, Temperature right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Temperature left, Temperature right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -490,7 +490,7 @@ public int CompareTo(object obj) /// public int CompareTo(Temperature other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -507,7 +507,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Temperature other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -585,7 +585,7 @@ public double As(TemperatureUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -598,7 +598,7 @@ public double As(TemperatureUnit unit) /// A Temperature with the specified unit. public Temperature ToUnit(TemperatureUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Temperature(convertedValue, unit); } @@ -612,7 +612,7 @@ public Temperature ToUnit(TemperatureUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -629,12 +629,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(TemperatureUnit unit) + private double GetValueAs(TemperatureUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index 4e73d5f4ef..9104020507 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -477,13 +477,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper /// Get from adding two . public static TemperatureChangeRate operator +(TemperatureChangeRate left, TemperatureChangeRate right) { - return new TemperatureChangeRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new TemperatureChangeRate(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static TemperatureChangeRate operator -(TemperatureChangeRate left, TemperatureChangeRate right) { - return new TemperatureChangeRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new TemperatureChangeRate(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -517,25 +517,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper /// Returns true if less or equal to. public static bool operator <=(TemperatureChangeRate left, TemperatureChangeRate right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(TemperatureChangeRate left, TemperatureChangeRate right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(TemperatureChangeRate left, TemperatureChangeRate right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(TemperatureChangeRate left, TemperatureChangeRate right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -564,7 +564,7 @@ public int CompareTo(object obj) /// public int CompareTo(TemperatureChangeRate other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -581,7 +581,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(TemperatureChangeRate other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -659,7 +659,7 @@ public double As(TemperatureChangeRateUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -672,7 +672,7 @@ public double As(TemperatureChangeRateUnit unit) /// A TemperatureChangeRate with the specified unit. public TemperatureChangeRate ToUnit(TemperatureChangeRateUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new TemperatureChangeRate(convertedValue, unit); } @@ -686,7 +686,7 @@ public TemperatureChangeRate ToUnit(TemperatureChangeRateUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -705,12 +705,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(TemperatureChangeRateUnit unit) + private double GetValueAs(TemperatureChangeRateUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index 1266c9a628..9cfd172601 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -449,13 +449,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper /// Get from adding two . public static TemperatureDelta operator +(TemperatureDelta left, TemperatureDelta right) { - return new TemperatureDelta(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new TemperatureDelta(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static TemperatureDelta operator -(TemperatureDelta left, TemperatureDelta right) { - return new TemperatureDelta(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new TemperatureDelta(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -489,25 +489,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Temper /// Returns true if less or equal to. public static bool operator <=(TemperatureDelta left, TemperatureDelta right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(TemperatureDelta left, TemperatureDelta right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(TemperatureDelta left, TemperatureDelta right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(TemperatureDelta left, TemperatureDelta right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -536,7 +536,7 @@ public int CompareTo(object obj) /// public int CompareTo(TemperatureDelta other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -553,7 +553,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(TemperatureDelta other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -631,7 +631,7 @@ public double As(TemperatureDeltaUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -644,7 +644,7 @@ public double As(TemperatureDeltaUnit unit) /// A TemperatureDelta with the specified unit. public TemperatureDelta ToUnit(TemperatureDeltaUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new TemperatureDelta(convertedValue, unit); } @@ -658,7 +658,7 @@ public TemperatureDelta ToUnit(TemperatureDeltaUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -675,12 +675,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(TemperatureDeltaUnit unit) + private double GetValueAs(TemperatureDeltaUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index 1235416884..e155a3890c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -368,13 +368,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Therma /// Get from adding two . public static ThermalConductivity operator +(ThermalConductivity left, ThermalConductivity right) { - return new ThermalConductivity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ThermalConductivity(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ThermalConductivity operator -(ThermalConductivity left, ThermalConductivity right) { - return new ThermalConductivity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ThermalConductivity(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -408,25 +408,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Therma /// Returns true if less or equal to. public static bool operator <=(ThermalConductivity left, ThermalConductivity right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ThermalConductivity left, ThermalConductivity right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ThermalConductivity left, ThermalConductivity right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ThermalConductivity left, ThermalConductivity right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -455,7 +455,7 @@ public int CompareTo(object obj) /// public int CompareTo(ThermalConductivity other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -472,7 +472,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ThermalConductivity other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -550,7 +550,7 @@ public double As(ThermalConductivityUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -563,7 +563,7 @@ public double As(ThermalConductivityUnit unit) /// A ThermalConductivity with the specified unit. public ThermalConductivity ToUnit(ThermalConductivityUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ThermalConductivity(convertedValue, unit); } @@ -577,7 +577,7 @@ public ThermalConductivity ToUnit(ThermalConductivityUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -588,12 +588,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ThermalConductivityUnit unit) + private double GetValueAs(ThermalConductivityUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index ddd0a3ed0f..09faf1d198 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -407,13 +407,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Therma /// Get from adding two . public static ThermalResistance operator +(ThermalResistance left, ThermalResistance right) { - return new ThermalResistance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new ThermalResistance(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static ThermalResistance operator -(ThermalResistance left, ThermalResistance right) { - return new ThermalResistance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new ThermalResistance(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -447,25 +447,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Therma /// Returns true if less or equal to. public static bool operator <=(ThermalResistance left, ThermalResistance right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(ThermalResistance left, ThermalResistance right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(ThermalResistance left, ThermalResistance right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(ThermalResistance left, ThermalResistance right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -494,7 +494,7 @@ public int CompareTo(object obj) /// public int CompareTo(ThermalResistance other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -511,7 +511,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(ThermalResistance other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -589,7 +589,7 @@ public double As(ThermalResistanceUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -602,7 +602,7 @@ public double As(ThermalResistanceUnit unit) /// A ThermalResistance with the specified unit. public ThermalResistance ToUnit(ThermalResistanceUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new ThermalResistance(convertedValue, unit); } @@ -616,7 +616,7 @@ public ThermalResistance ToUnit(ThermalResistanceUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -630,12 +630,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(ThermalResistanceUnit unit) + private double GetValueAs(ThermalResistanceUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index 46b530879e..20ae938dfd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -631,13 +631,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Torque /// Get from adding two . public static Torque operator +(Torque left, Torque right) { - return new Torque(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Torque(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Torque operator -(Torque left, Torque right) { - return new Torque(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Torque(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -671,25 +671,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Torque /// Returns true if less or equal to. public static bool operator <=(Torque left, Torque right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Torque left, Torque right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Torque left, Torque right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Torque left, Torque right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -718,7 +718,7 @@ public int CompareTo(object obj) /// public int CompareTo(Torque other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -735,7 +735,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Torque other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -813,7 +813,7 @@ public double As(TorqueUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -826,7 +826,7 @@ public double As(TorqueUnit unit) /// A Torque with the specified unit. public Torque ToUnit(TorqueUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Torque(convertedValue, unit); } @@ -840,7 +840,7 @@ public Torque ToUnit(TorqueUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -870,12 +870,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(TorqueUnit unit) + private double GetValueAs(TorqueUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index 22a511ef67..0b94550fd4 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -351,13 +351,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Vitami /// Get from adding two . public static VitaminA operator +(VitaminA left, VitaminA right) { - return new VitaminA(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new VitaminA(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static VitaminA operator -(VitaminA left, VitaminA right) { - return new VitaminA(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new VitaminA(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -391,25 +391,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Vitami /// Returns true if less or equal to. public static bool operator <=(VitaminA left, VitaminA right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(VitaminA left, VitaminA right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(VitaminA left, VitaminA right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(VitaminA left, VitaminA right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -438,7 +438,7 @@ public int CompareTo(object obj) /// public int CompareTo(VitaminA other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -455,7 +455,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(VitaminA other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -533,7 +533,7 @@ public double As(VitaminAUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -546,7 +546,7 @@ public double As(VitaminAUnit unit) /// A VitaminA with the specified unit. public VitaminA ToUnit(VitaminAUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new VitaminA(convertedValue, unit); } @@ -560,7 +560,7 @@ public VitaminA ToUnit(VitaminAUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -570,12 +570,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(VitaminAUnit unit) + private double GetValueAs(VitaminAUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index 9fee0032c1..a3200c9b60 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -967,13 +967,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Volume /// Get from adding two . public static Volume operator +(Volume left, Volume right) { - return new Volume(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new Volume(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static Volume operator -(Volume left, Volume right) { - return new Volume(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new Volume(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -1007,25 +1007,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Volume /// Returns true if less or equal to. public static bool operator <=(Volume left, Volume right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(Volume left, Volume right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(Volume left, Volume right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(Volume left, Volume right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -1054,7 +1054,7 @@ public int CompareTo(object obj) /// public int CompareTo(Volume other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -1071,7 +1071,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(Volume other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -1149,7 +1149,7 @@ public double As(VolumeUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -1162,7 +1162,7 @@ public double As(VolumeUnit unit) /// A Volume with the specified unit. public Volume ToUnit(VolumeUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new Volume(convertedValue, unit); } @@ -1176,7 +1176,7 @@ public Volume ToUnit(VolumeUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -1230,12 +1230,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(VolumeUnit unit) + private double GetValueAs(VolumeUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 8319eafe8f..66c3b22256 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -1009,13 +1009,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Volume /// Get from adding two . public static VolumeFlow operator +(VolumeFlow left, VolumeFlow right) { - return new VolumeFlow(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new VolumeFlow(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static VolumeFlow operator -(VolumeFlow left, VolumeFlow right) { - return new VolumeFlow(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new VolumeFlow(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -1049,25 +1049,25 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Volume /// Returns true if less or equal to. public static bool operator <=(VolumeFlow left, VolumeFlow right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=(VolumeFlow left, VolumeFlow right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <(VolumeFlow left, VolumeFlow right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >(VolumeFlow left, VolumeFlow right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -1096,7 +1096,7 @@ public int CompareTo(object obj) /// public int CompareTo(VolumeFlow other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -1113,7 +1113,7 @@ public override bool Equals(object obj) /// Consider using for safely comparing floating point values. public bool Equals(VolumeFlow other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -1191,7 +1191,7 @@ public double As(VolumeFlowUnit unit) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -1204,7 +1204,7 @@ public double As(VolumeFlowUnit unit) /// A VolumeFlow with the specified unit. public VolumeFlow ToUnit(VolumeFlowUnit unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new VolumeFlow(convertedValue, unit); } @@ -1218,7 +1218,7 @@ public VolumeFlow ToUnit(VolumeFlowUnit unit) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private double AsBaseUnit() + private double GetValueInBaseUnit() { switch(Unit) { @@ -1275,12 +1275,12 @@ private double AsBaseUnit() } } - private double AsBaseNumericType(VolumeFlowUnit unit) + private double GetValueAs(VolumeFlowUnit unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) { diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 index 35837eef97..3e4f350dfe 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCode.ps1 @@ -654,7 +654,7 @@ function GenerateLogarithmicArithmeticOperators([GeneratorArgs]$genArgs) { // Logarithmic addition // Formula: $x*log10(10^(x/$x) + 10^(y/$x)) - return new $quantityName($x*Math.Log10(Math.Pow(10, left.Value/$x) + Math.Pow(10, right.AsBaseNumericType(left.Unit)/$x)), left.Unit); + return new $quantityName($x*Math.Log10(Math.Pow(10, left.Value/$x) + Math.Pow(10, right.GetValueAs(left.Unit)/$x)), left.Unit); } /// Get from logarithmic subtraction of two . @@ -662,7 +662,7 @@ function GenerateLogarithmicArithmeticOperators([GeneratorArgs]$genArgs) { // Logarithmic subtraction // Formula: $x*log10(10^(x/$x) - 10^(y/$x)) - return new $quantityName($x*Math.Log10(Math.Pow(10, left.Value/$x) - Math.Pow(10, right.AsBaseNumericType(left.Unit)/$x)), left.Unit); + return new $quantityName($x*Math.Log10(Math.Pow(10, left.Value/$x) - Math.Pow(10, right.GetValueAs(left.Unit)/$x)), left.Unit); } /// Get from logarithmic multiplication of value and . @@ -690,7 +690,7 @@ function GenerateLogarithmicArithmeticOperators([GeneratorArgs]$genArgs) public static double operator /($quantityName left, $quantityName right) { // Logarithmic division = subtraction - return Convert.ToDouble(left.Value - right.AsBaseNumericType(left.Unit)); + return Convert.ToDouble(left.Value - right.GetValueAs(left.Unit)); } #endregion @@ -723,13 +723,13 @@ function GenerateArithmeticOperators([GeneratorArgs]$genArgs) /// Get from adding two . public static $quantityName operator +($quantityName left, $quantityName right) { - return new $quantityName(left.Value + right.AsBaseNumericType(left.Unit), left.Unit); + return new $quantityName(left.Value + right.GetValueAs(left.Unit), left.Unit); } /// Get from subtracting two . public static $quantityName operator -($quantityName left, $quantityName right) { - return new $quantityName(left.Value - right.AsBaseNumericType(left.Unit), left.Unit); + return new $quantityName(left.Value - right.GetValueAs(left.Unit), left.Unit); } /// Get from multiplying value and . @@ -770,25 +770,25 @@ function GenerateEqualityAndComparison([GeneratorArgs]$genArgs) /// Returns true if less or equal to. public static bool operator <=($quantityName left, $quantityName right) { - return left.Value <= right.AsBaseNumericType(left.Unit); + return left.Value <= right.GetValueAs(left.Unit); } /// Returns true if greater than or equal to. public static bool operator >=($quantityName left, $quantityName right) { - return left.Value >= right.AsBaseNumericType(left.Unit); + return left.Value >= right.GetValueAs(left.Unit); } /// Returns true if less than. public static bool operator <($quantityName left, $quantityName right) { - return left.Value < right.AsBaseNumericType(left.Unit); + return left.Value < right.GetValueAs(left.Unit); } /// Returns true if greater than. public static bool operator >($quantityName left, $quantityName right) { - return left.Value > right.AsBaseNumericType(left.Unit); + return left.Value > right.GetValueAs(left.Unit); } /// Returns true if exactly equal. @@ -817,7 +817,7 @@ function GenerateEqualityAndComparison([GeneratorArgs]$genArgs) /// public int CompareTo($quantityName other) { - return _value.CompareTo(other.AsBaseNumericType(this.Unit)); + return _value.CompareTo(other.GetValueAs(this.Unit)); } /// @@ -834,7 +834,7 @@ function GenerateEqualityAndComparison([GeneratorArgs]$genArgs) /// Consider using for safely comparing floating point values. public bool Equals($quantityName other) { - return _value.Equals(other.AsBaseNumericType(this.Unit)); + return _value.Equals(other.GetValueAs(this.Unit)); } /// @@ -921,7 +921,7 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) if(Unit == unit) return Convert.ToDouble(Value); - var converted = AsBaseNumericType(unit); + var converted = GetValueAs(unit); return Convert.ToDouble(converted); } @@ -934,7 +934,7 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) /// A $quantityName with the specified unit. public $quantityName ToUnit($unitEnumName unit) { - var convertedValue = AsBaseNumericType(unit); + var convertedValue = GetValueAs(unit); return new $quantityName(convertedValue, unit); } @@ -948,7 +948,7 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) /// This is typically the first step in converting from one unit to another. /// /// The value in the base unit representation. - private $valueType AsBaseUnit() + private $valueType GetValueInBaseUnit() { switch(Unit) { @@ -961,12 +961,12 @@ function GenerateConversionMethods([GeneratorArgs]$genArgs) } } - private $valueType AsBaseNumericType($unitEnumName unit) + private $valueType GetValueAs($unitEnumName unit) { if(Unit == unit) return _value; - var baseUnitValue = AsBaseUnit(); + var baseUnitValue = GetValueInBaseUnit(); switch(unit) {