diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs index 8011ae4fef..7309fa14f6 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,130 +31,82 @@ public static class NumberToAbsorbedDoseOfIonizingRadiationExtensions { /// public static AbsorbedDoseOfIonizingRadiation Centigrays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromCentigrays(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Femtograys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromFemtograys(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Gigagrays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromGigagrays(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Grays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromGrays(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Kilograys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromKilograys(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Kilorads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromKilorads(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Megagrays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromMegagrays(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Megarads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromMegarads(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Micrograys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromMicrograys(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Milligrays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromMilligrays(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Millirads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromMillirads(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Nanograys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromNanograys(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Petagrays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromPetagrays(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Picograys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromPicograys(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Rads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromRads(Convert.ToDouble(value)); /// public static AbsorbedDoseOfIonizingRadiation Teragrays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AbsorbedDoseOfIonizingRadiation.FromTeragrays(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs index 53301e4bef..34d4eaf34f 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,114 +31,72 @@ public static class NumberToAccelerationExtensions { /// public static Acceleration CentimetersPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromCentimetersPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration DecimetersPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromDecimetersPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration FeetPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromFeetPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration InchesPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromInchesPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration KilometersPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromKilometersPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration KnotsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromKnotsPerHour(Convert.ToDouble(value)); /// public static Acceleration KnotsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromKnotsPerMinute(Convert.ToDouble(value)); /// public static Acceleration KnotsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromKnotsPerSecond(Convert.ToDouble(value)); /// public static Acceleration MetersPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromMetersPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration MicrometersPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromMicrometersPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration MillimetersPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromMillimetersPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration MillistandardGravity(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromMillistandardGravity(Convert.ToDouble(value)); /// public static Acceleration NanometersPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromNanometersPerSecondSquared(Convert.ToDouble(value)); /// public static Acceleration StandardGravity(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Acceleration.FromStandardGravity(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs index 4993b43931..0c1f87cce5 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,138 +31,87 @@ public static class NumberToAmountOfSubstanceExtensions { /// public static AmountOfSubstance Centimoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromCentimoles(Convert.ToDouble(value)); /// public static AmountOfSubstance CentipoundMoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromCentipoundMoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Decimoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromDecimoles(Convert.ToDouble(value)); /// public static AmountOfSubstance DecipoundMoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromDecipoundMoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Femtomoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromFemtomoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Kilomoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromKilomoles(Convert.ToDouble(value)); /// public static AmountOfSubstance KilopoundMoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromKilopoundMoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Megamoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromMegamoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Micromoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromMicromoles(Convert.ToDouble(value)); /// public static AmountOfSubstance MicropoundMoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromMicropoundMoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Millimoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromMillimoles(Convert.ToDouble(value)); /// public static AmountOfSubstance MillipoundMoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromMillipoundMoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Moles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromMoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Nanomoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromNanomoles(Convert.ToDouble(value)); /// public static AmountOfSubstance NanopoundMoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromNanopoundMoles(Convert.ToDouble(value)); /// public static AmountOfSubstance Picomoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromPicomoles(Convert.ToDouble(value)); /// public static AmountOfSubstance PoundMoles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmountOfSubstance.FromPoundMoles(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs index 778ee3b019..cabf8a1e8b 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToAmplitudeRatioExtensions { /// public static AmplitudeRatio DecibelMicrovolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmplitudeRatio.FromDecibelMicrovolts(Convert.ToDouble(value)); /// public static AmplitudeRatio DecibelMillivolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmplitudeRatio.FromDecibelMillivolts(Convert.ToDouble(value)); /// public static AmplitudeRatio DecibelsUnloaded(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmplitudeRatio.FromDecibelsUnloaded(Convert.ToDouble(value)); /// public static AmplitudeRatio DecibelVolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AmplitudeRatio.FromDecibelVolts(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs index 538044922c..1aa1c6186f 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,130 +31,82 @@ public static class NumberToAngleExtensions { /// public static Angle Arcminutes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromArcminutes(Convert.ToDouble(value)); /// public static Angle Arcseconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromArcseconds(Convert.ToDouble(value)); /// public static Angle Centiradians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromCentiradians(Convert.ToDouble(value)); /// public static Angle Deciradians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromDeciradians(Convert.ToDouble(value)); /// public static Angle Degrees(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromDegrees(Convert.ToDouble(value)); /// public static Angle Gradians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromGradians(Convert.ToDouble(value)); /// public static Angle Microdegrees(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromMicrodegrees(Convert.ToDouble(value)); /// public static Angle Microradians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromMicroradians(Convert.ToDouble(value)); /// public static Angle Millidegrees(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromMillidegrees(Convert.ToDouble(value)); /// public static Angle Milliradians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromMilliradians(Convert.ToDouble(value)); /// public static Angle Nanodegrees(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromNanodegrees(Convert.ToDouble(value)); /// public static Angle Nanoradians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromNanoradians(Convert.ToDouble(value)); /// public static Angle NatoMils(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromNatoMils(Convert.ToDouble(value)); /// public static Angle Radians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromRadians(Convert.ToDouble(value)); /// public static Angle Revolutions(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromRevolutions(Convert.ToDouble(value)); /// public static Angle Tilt(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Angle.FromTilt(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs index 4f5e9aa218..0cad93ad23 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToApparentEnergyExtensions { /// public static ApparentEnergy KilovoltampereHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentEnergy.FromKilovoltampereHours(Convert.ToDouble(value)); /// public static ApparentEnergy MegavoltampereHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentEnergy.FromMegavoltampereHours(Convert.ToDouble(value)); /// public static ApparentEnergy VoltampereHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentEnergy.FromVoltampereHours(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs index 7fb405d7e3..5ec1a3e4c1 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToApparentPowerExtensions { /// public static ApparentPower Gigavoltamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentPower.FromGigavoltamperes(Convert.ToDouble(value)); /// public static ApparentPower Kilovoltamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentPower.FromKilovoltamperes(Convert.ToDouble(value)); /// public static ApparentPower Megavoltamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentPower.FromMegavoltamperes(Convert.ToDouble(value)); /// public static ApparentPower Microvoltamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentPower.FromMicrovoltamperes(Convert.ToDouble(value)); /// public static ApparentPower Millivoltamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentPower.FromMillivoltamperes(Convert.ToDouble(value)); /// public static ApparentPower Voltamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ApparentPower.FromVoltamperes(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs index ad2a5a212a..72ccd296bb 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToAreaDensityExtensions { /// public static AreaDensity GramsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaDensity.FromGramsPerSquareMeter(Convert.ToDouble(value)); /// public static AreaDensity KilogramsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaDensity.FromKilogramsPerSquareMeter(Convert.ToDouble(value)); /// public static AreaDensity MilligramsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaDensity.FromMilligramsPerSquareMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs index 11c81e72b1..1e6a676fe5 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,114 +31,72 @@ public static class NumberToAreaExtensions { /// public static Area Acres(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromAcres(Convert.ToDouble(value)); /// public static Area Hectares(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromHectares(Convert.ToDouble(value)); /// public static Area SquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareCentimeters(Convert.ToDouble(value)); /// public static Area SquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareDecimeters(Convert.ToDouble(value)); /// public static Area SquareFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareFeet(Convert.ToDouble(value)); /// public static Area SquareInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareInches(Convert.ToDouble(value)); /// public static Area SquareKilometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareKilometers(Convert.ToDouble(value)); /// public static Area SquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareMeters(Convert.ToDouble(value)); /// public static Area SquareMicrometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareMicrometers(Convert.ToDouble(value)); /// public static Area SquareMiles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareMiles(Convert.ToDouble(value)); /// public static Area SquareMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareMillimeters(Convert.ToDouble(value)); /// public static Area SquareNauticalMiles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareNauticalMiles(Convert.ToDouble(value)); /// public static Area SquareYards(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromSquareYards(Convert.ToDouble(value)); /// public static Area UsSurveySquareFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Area.FromUsSurveySquareFeet(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs index 09807623e6..e91ab57f4c 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToAreaMomentOfInertiaExtensions { /// public static AreaMomentOfInertia CentimetersToTheFourth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaMomentOfInertia.FromCentimetersToTheFourth(Convert.ToDouble(value)); /// public static AreaMomentOfInertia DecimetersToTheFourth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaMomentOfInertia.FromDecimetersToTheFourth(Convert.ToDouble(value)); /// public static AreaMomentOfInertia FeetToTheFourth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaMomentOfInertia.FromFeetToTheFourth(Convert.ToDouble(value)); /// public static AreaMomentOfInertia InchesToTheFourth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaMomentOfInertia.FromInchesToTheFourth(Convert.ToDouble(value)); /// public static AreaMomentOfInertia MetersToTheFourth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaMomentOfInertia.FromMetersToTheFourth(Convert.ToDouble(value)); /// public static AreaMomentOfInertia MillimetersToTheFourth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => AreaMomentOfInertia.FromMillimetersToTheFourth(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs index 2f85da9ccc..c3138bf6bc 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,210 +31,132 @@ public static class NumberToBitRateExtensions { /// public static BitRate BitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromBitsPerSecond(Convert.ToDouble(value)); /// public static BitRate BytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromBytesPerSecond(Convert.ToDouble(value)); /// public static BitRate ExabitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromExabitsPerSecond(Convert.ToDouble(value)); /// public static BitRate ExabytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromExabytesPerSecond(Convert.ToDouble(value)); /// public static BitRate ExbibitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromExbibitsPerSecond(Convert.ToDouble(value)); /// public static BitRate ExbibytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromExbibytesPerSecond(Convert.ToDouble(value)); /// public static BitRate GibibitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromGibibitsPerSecond(Convert.ToDouble(value)); /// public static BitRate GibibytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromGibibytesPerSecond(Convert.ToDouble(value)); /// public static BitRate GigabitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromGigabitsPerSecond(Convert.ToDouble(value)); /// public static BitRate GigabytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromGigabytesPerSecond(Convert.ToDouble(value)); /// public static BitRate KibibitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromKibibitsPerSecond(Convert.ToDouble(value)); /// public static BitRate KibibytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromKibibytesPerSecond(Convert.ToDouble(value)); /// public static BitRate KilobitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromKilobitsPerSecond(Convert.ToDouble(value)); /// public static BitRate KilobytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromKilobytesPerSecond(Convert.ToDouble(value)); /// public static BitRate MebibitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromMebibitsPerSecond(Convert.ToDouble(value)); /// public static BitRate MebibytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromMebibytesPerSecond(Convert.ToDouble(value)); /// public static BitRate MegabitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromMegabitsPerSecond(Convert.ToDouble(value)); /// public static BitRate MegabytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromMegabytesPerSecond(Convert.ToDouble(value)); /// public static BitRate PebibitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromPebibitsPerSecond(Convert.ToDouble(value)); /// public static BitRate PebibytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromPebibytesPerSecond(Convert.ToDouble(value)); /// public static BitRate PetabitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromPetabitsPerSecond(Convert.ToDouble(value)); /// public static BitRate PetabytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromPetabytesPerSecond(Convert.ToDouble(value)); /// public static BitRate TebibitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromTebibitsPerSecond(Convert.ToDouble(value)); /// public static BitRate TebibytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromTebibytesPerSecond(Convert.ToDouble(value)); /// public static BitRate TerabitsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromTerabitsPerSecond(Convert.ToDouble(value)); /// public static BitRate TerabytesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BitRate.FromTerabytesPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs index bfffa5835f..2b1ae293a4 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToBrakeSpecificFuelConsumptionExtensions { /// public static BrakeSpecificFuelConsumption GramsPerKiloWattHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BrakeSpecificFuelConsumption.FromGramsPerKiloWattHour(Convert.ToDouble(value)); /// public static BrakeSpecificFuelConsumption KilogramsPerJoule(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BrakeSpecificFuelConsumption.FromKilogramsPerJoule(Convert.ToDouble(value)); /// public static BrakeSpecificFuelConsumption PoundsPerMechanicalHorsepowerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => BrakeSpecificFuelConsumption.FromPoundsPerMechanicalHorsepowerHour(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs index ca11428455..b1a35bc945 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,58 +31,37 @@ public static class NumberToCapacitanceExtensions { /// public static Capacitance Farads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Capacitance.FromFarads(Convert.ToDouble(value)); /// public static Capacitance Kilofarads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Capacitance.FromKilofarads(Convert.ToDouble(value)); /// public static Capacitance Megafarads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Capacitance.FromMegafarads(Convert.ToDouble(value)); /// public static Capacitance Microfarads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Capacitance.FromMicrofarads(Convert.ToDouble(value)); /// public static Capacitance Millifarads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Capacitance.FromMillifarads(Convert.ToDouble(value)); /// public static Capacitance Nanofarads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Capacitance.FromNanofarads(Convert.ToDouble(value)); /// public static Capacitance Picofarads(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Capacitance.FromPicofarads(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensions.g.cs index 22adc70a09..28c65318c7 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToCoefficientOfThermalExpansionExtensions { /// public static CoefficientOfThermalExpansion PerDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => CoefficientOfThermalExpansion.FromPerDegreeCelsius(Convert.ToDouble(value)); /// public static CoefficientOfThermalExpansion PerDegreeFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => CoefficientOfThermalExpansion.FromPerDegreeFahrenheit(Convert.ToDouble(value)); /// public static CoefficientOfThermalExpansion PerKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => CoefficientOfThermalExpansion.FromPerKelvin(Convert.ToDouble(value)); /// public static CoefficientOfThermalExpansion PpmPerDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => CoefficientOfThermalExpansion.FromPpmPerDegreeCelsius(Convert.ToDouble(value)); /// public static CoefficientOfThermalExpansion PpmPerDegreeFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => CoefficientOfThermalExpansion.FromPpmPerDegreeFahrenheit(Convert.ToDouble(value)); /// public static CoefficientOfThermalExpansion PpmPerKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => CoefficientOfThermalExpansion.FromPpmPerKelvin(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCompressibilityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCompressibilityExtensions.g.cs index f5683c23f3..643e255de4 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCompressibilityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCompressibilityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,58 +31,37 @@ public static class NumberToCompressibilityExtensions { /// public static Compressibility InverseAtmospheres(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Compressibility.FromInverseAtmospheres(Convert.ToDouble(value)); /// public static Compressibility InverseBars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Compressibility.FromInverseBars(Convert.ToDouble(value)); /// public static Compressibility InverseKilopascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Compressibility.FromInverseKilopascals(Convert.ToDouble(value)); /// public static Compressibility InverseMegapascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Compressibility.FromInverseMegapascals(Convert.ToDouble(value)); /// public static Compressibility InverseMillibars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Compressibility.FromInverseMillibars(Convert.ToDouble(value)); /// public static Compressibility InversePascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Compressibility.FromInversePascals(Convert.ToDouble(value)); /// public static Compressibility InversePoundsForcePerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Compressibility.FromInversePoundsForcePerSquareInch(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToDensityExtensions.g.cs index a10af41796..fcdab3cd5d 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,450 +31,282 @@ public static class NumberToDensityExtensions { /// public static Density CentigramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromCentigramsPerDeciliter(Convert.ToDouble(value)); /// public static Density CentigramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromCentigramsPerLiter(Convert.ToDouble(value)); /// public static Density CentigramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromCentigramsPerMilliliter(Convert.ToDouble(value)); /// public static Density DecigramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromDecigramsPerDeciliter(Convert.ToDouble(value)); /// public static Density DecigramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromDecigramsPerLiter(Convert.ToDouble(value)); /// public static Density DecigramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromDecigramsPerMilliliter(Convert.ToDouble(value)); /// public static Density FemtogramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromFemtogramsPerDeciliter(Convert.ToDouble(value)); /// public static Density FemtogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromFemtogramsPerLiter(Convert.ToDouble(value)); /// public static Density FemtogramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromFemtogramsPerMilliliter(Convert.ToDouble(value)); /// public static Density GramsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerCubicCentimeter(Convert.ToDouble(value)); /// public static Density GramsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerCubicFoot(Convert.ToDouble(value)); /// public static Density GramsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerCubicInch(Convert.ToDouble(value)); /// public static Density GramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerCubicMeter(Convert.ToDouble(value)); /// public static Density GramsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerCubicMillimeter(Convert.ToDouble(value)); /// public static Density GramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerDeciliter(Convert.ToDouble(value)); /// public static Density GramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerLiter(Convert.ToDouble(value)); /// public static Density GramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromGramsPerMilliliter(Convert.ToDouble(value)); /// public static Density KilogramsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromKilogramsPerCubicCentimeter(Convert.ToDouble(value)); /// public static Density KilogramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromKilogramsPerCubicMeter(Convert.ToDouble(value)); /// public static Density KilogramsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromKilogramsPerCubicMillimeter(Convert.ToDouble(value)); /// public static Density KilogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromKilogramsPerLiter(Convert.ToDouble(value)); /// public static Density KilopoundsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromKilopoundsPerCubicFoot(Convert.ToDouble(value)); /// public static Density KilopoundsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromKilopoundsPerCubicInch(Convert.ToDouble(value)); /// public static Density KilopoundsPerCubicYard(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromKilopoundsPerCubicYard(Convert.ToDouble(value)); /// public static Density MicrogramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMicrogramsPerCubicMeter(Convert.ToDouble(value)); /// public static Density MicrogramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMicrogramsPerDeciliter(Convert.ToDouble(value)); /// public static Density MicrogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMicrogramsPerLiter(Convert.ToDouble(value)); /// public static Density MicrogramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMicrogramsPerMilliliter(Convert.ToDouble(value)); /// public static Density MilligramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMilligramsPerCubicMeter(Convert.ToDouble(value)); /// public static Density MilligramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMilligramsPerDeciliter(Convert.ToDouble(value)); /// public static Density MilligramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMilligramsPerLiter(Convert.ToDouble(value)); /// public static Density MilligramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromMilligramsPerMilliliter(Convert.ToDouble(value)); /// public static Density NanogramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromNanogramsPerDeciliter(Convert.ToDouble(value)); /// public static Density NanogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromNanogramsPerLiter(Convert.ToDouble(value)); /// public static Density NanogramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromNanogramsPerMilliliter(Convert.ToDouble(value)); /// public static Density PicogramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPicogramsPerDeciliter(Convert.ToDouble(value)); /// public static Density PicogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPicogramsPerLiter(Convert.ToDouble(value)); /// public static Density PicogramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPicogramsPerMilliliter(Convert.ToDouble(value)); /// public static Density PoundsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerCubicCentimeter(Convert.ToDouble(value)); /// public static Density PoundsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerCubicFoot(Convert.ToDouble(value)); /// public static Density PoundsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerCubicInch(Convert.ToDouble(value)); /// public static Density PoundsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerCubicMeter(Convert.ToDouble(value)); /// public static Density PoundsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerCubicMillimeter(Convert.ToDouble(value)); /// public static Density PoundsPerCubicYard(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerCubicYard(Convert.ToDouble(value)); /// public static Density PoundsPerImperialGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerImperialGallon(Convert.ToDouble(value)); /// public static Density PoundsPerUSGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromPoundsPerUSGallon(Convert.ToDouble(value)); /// public static Density SlugsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromSlugsPerCubicCentimeter(Convert.ToDouble(value)); /// public static Density SlugsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromSlugsPerCubicFoot(Convert.ToDouble(value)); /// public static Density SlugsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromSlugsPerCubicInch(Convert.ToDouble(value)); /// public static Density SlugsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromSlugsPerCubicMeter(Convert.ToDouble(value)); /// public static Density SlugsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromSlugsPerCubicMillimeter(Convert.ToDouble(value)); /// public static Density TonnesPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromTonnesPerCubicCentimeter(Convert.ToDouble(value)); /// public static Density TonnesPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromTonnesPerCubicFoot(Convert.ToDouble(value)); /// public static Density TonnesPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromTonnesPerCubicInch(Convert.ToDouble(value)); /// public static Density TonnesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromTonnesPerCubicMeter(Convert.ToDouble(value)); /// public static Density TonnesPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Density.FromTonnesPerCubicMillimeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToDurationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToDurationExtensions.g.cs index 518f224453..9c68a0200b 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToDurationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToDurationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,90 +31,57 @@ public static class NumberToDurationExtensions { /// public static Duration Days(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromDays(Convert.ToDouble(value)); /// public static Duration Hours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromHours(Convert.ToDouble(value)); /// public static Duration JulianYears(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromJulianYears(Convert.ToDouble(value)); /// public static Duration Microseconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromMicroseconds(Convert.ToDouble(value)); /// public static Duration Milliseconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromMilliseconds(Convert.ToDouble(value)); /// public static Duration Minutes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromMinutes(Convert.ToDouble(value)); /// public static Duration Months30(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromMonths30(Convert.ToDouble(value)); /// public static Duration Nanoseconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromNanoseconds(Convert.ToDouble(value)); /// public static Duration Seconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromSeconds(Convert.ToDouble(value)); /// public static Duration Weeks(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromWeeks(Convert.ToDouble(value)); /// public static Duration Years365(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Duration.FromYears365(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToDynamicViscosityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToDynamicViscosityExtensions.g.cs index 59c792b747..66215460f3 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToDynamicViscosityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToDynamicViscosityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,82 +31,52 @@ public static class NumberToDynamicViscosityExtensions { /// public static DynamicViscosity Centipoise(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromCentipoise(Convert.ToDouble(value)); /// public static DynamicViscosity MicropascalSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromMicropascalSeconds(Convert.ToDouble(value)); /// public static DynamicViscosity MillipascalSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromMillipascalSeconds(Convert.ToDouble(value)); /// public static DynamicViscosity NewtonSecondsPerMeterSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromNewtonSecondsPerMeterSquared(Convert.ToDouble(value)); /// public static DynamicViscosity PascalSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromPascalSeconds(Convert.ToDouble(value)); /// public static DynamicViscosity Poise(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromPoise(Convert.ToDouble(value)); /// public static DynamicViscosity PoundsForceSecondPerSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromPoundsForceSecondPerSquareFoot(Convert.ToDouble(value)); /// public static DynamicViscosity PoundsForceSecondPerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromPoundsForceSecondPerSquareInch(Convert.ToDouble(value)); /// public static DynamicViscosity PoundsPerFootSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromPoundsPerFootSecond(Convert.ToDouble(value)); /// public static DynamicViscosity Reyns(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => DynamicViscosity.FromReyns(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs index b02da0f9f6..f87b188436 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToElectricAdmittanceExtensions { /// public static ElectricAdmittance Microsiemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricAdmittance.FromMicrosiemens(Convert.ToDouble(value)); /// public static ElectricAdmittance Millisiemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricAdmittance.FromMillisiemens(Convert.ToDouble(value)); /// public static ElectricAdmittance Nanosiemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricAdmittance.FromNanosiemens(Convert.ToDouble(value)); /// public static ElectricAdmittance Siemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricAdmittance.FromSiemens(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeDensityExtensions.g.cs index 640d805651..9f457ebb6d 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToElectricChargeDensityExtensions { /// public static ElectricChargeDensity CoulombsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricChargeDensity.FromCoulombsPerCubicMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeExtensions.g.cs index 422aa5f121..8752802db5 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricChargeExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,90 +31,57 @@ public static class NumberToElectricChargeExtensions { /// public static ElectricCharge AmpereHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromAmpereHours(Convert.ToDouble(value)); /// public static ElectricCharge Coulombs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromCoulombs(Convert.ToDouble(value)); /// public static ElectricCharge KiloampereHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromKiloampereHours(Convert.ToDouble(value)); /// public static ElectricCharge Kilocoulombs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromKilocoulombs(Convert.ToDouble(value)); /// public static ElectricCharge MegaampereHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromMegaampereHours(Convert.ToDouble(value)); /// public static ElectricCharge Megacoulombs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromMegacoulombs(Convert.ToDouble(value)); /// public static ElectricCharge Microcoulombs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromMicrocoulombs(Convert.ToDouble(value)); /// public static ElectricCharge MilliampereHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromMilliampereHours(Convert.ToDouble(value)); /// public static ElectricCharge Millicoulombs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromMillicoulombs(Convert.ToDouble(value)); /// public static ElectricCharge Nanocoulombs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromNanocoulombs(Convert.ToDouble(value)); /// public static ElectricCharge Picocoulombs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCharge.FromPicocoulombs(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs index d656b7462b..47e2fb98a3 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,42 +31,27 @@ public static class NumberToElectricConductanceExtensions { /// public static ElectricConductance Kilosiemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductance.FromKilosiemens(Convert.ToDouble(value)); /// public static ElectricConductance Microsiemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductance.FromMicrosiemens(Convert.ToDouble(value)); /// public static ElectricConductance Millisiemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductance.FromMillisiemens(Convert.ToDouble(value)); /// public static ElectricConductance Nanosiemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductance.FromNanosiemens(Convert.ToDouble(value)); /// public static ElectricConductance Siemens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductance.FromSiemens(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductivityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductivityExtensions.g.cs index d5a791c5c9..1d80692efc 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductivityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductivityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToElectricConductivityExtensions { /// public static ElectricConductivity MicrosiemensPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductivity.FromMicrosiemensPerCentimeter(Convert.ToDouble(value)); /// public static ElectricConductivity MillisiemensPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductivity.FromMillisiemensPerCentimeter(Convert.ToDouble(value)); /// public static ElectricConductivity SiemensPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductivity.FromSiemensPerCentimeter(Convert.ToDouble(value)); /// public static ElectricConductivity SiemensPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductivity.FromSiemensPerFoot(Convert.ToDouble(value)); /// public static ElectricConductivity SiemensPerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductivity.FromSiemensPerInch(Convert.ToDouble(value)); /// public static ElectricConductivity SiemensPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricConductivity.FromSiemensPerMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentDensityExtensions.g.cs index 58d52df54b..05102d870b 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToElectricCurrentDensityExtensions { /// public static ElectricCurrentDensity AmperesPerSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentDensity.FromAmperesPerSquareFoot(Convert.ToDouble(value)); /// public static ElectricCurrentDensity AmperesPerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentDensity.FromAmperesPerSquareInch(Convert.ToDouble(value)); /// public static ElectricCurrentDensity AmperesPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentDensity.FromAmperesPerSquareMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentExtensions.g.cs index 42816bffd1..f264c3664f 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToElectricCurrentExtensions { /// public static ElectricCurrent Amperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromAmperes(Convert.ToDouble(value)); /// public static ElectricCurrent Centiamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromCentiamperes(Convert.ToDouble(value)); /// public static ElectricCurrent Femtoamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromFemtoamperes(Convert.ToDouble(value)); /// public static ElectricCurrent Kiloamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromKiloamperes(Convert.ToDouble(value)); /// public static ElectricCurrent Megaamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromMegaamperes(Convert.ToDouble(value)); /// public static ElectricCurrent Microamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromMicroamperes(Convert.ToDouble(value)); /// public static ElectricCurrent Milliamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromMilliamperes(Convert.ToDouble(value)); /// public static ElectricCurrent Nanoamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromNanoamperes(Convert.ToDouble(value)); /// public static ElectricCurrent Picoamperes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrent.FromPicoamperes(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentGradientExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentGradientExtensions.g.cs index 898b7c41e0..0275dbaef9 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentGradientExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCurrentGradientExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,58 +31,37 @@ public static class NumberToElectricCurrentGradientExtensions { /// public static ElectricCurrentGradient AmperesPerMicrosecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentGradient.FromAmperesPerMicrosecond(Convert.ToDouble(value)); /// public static ElectricCurrentGradient AmperesPerMillisecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentGradient.FromAmperesPerMillisecond(Convert.ToDouble(value)); /// public static ElectricCurrentGradient AmperesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentGradient.FromAmperesPerMinute(Convert.ToDouble(value)); /// public static ElectricCurrentGradient AmperesPerNanosecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentGradient.FromAmperesPerNanosecond(Convert.ToDouble(value)); /// public static ElectricCurrentGradient AmperesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentGradient.FromAmperesPerSecond(Convert.ToDouble(value)); /// public static ElectricCurrentGradient MilliamperesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentGradient.FromMilliamperesPerMinute(Convert.ToDouble(value)); /// public static ElectricCurrentGradient MilliamperesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricCurrentGradient.FromMilliamperesPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricFieldExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricFieldExtensions.g.cs index bb9a391be8..79d7c2cb72 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricFieldExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricFieldExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToElectricFieldExtensions { /// public static ElectricField VoltsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricField.FromVoltsPerMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricInductanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricInductanceExtensions.g.cs index 07aedbcbb2..1dcd22c715 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricInductanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricInductanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,42 +31,27 @@ public static class NumberToElectricInductanceExtensions { /// public static ElectricInductance Henries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricInductance.FromHenries(Convert.ToDouble(value)); /// public static ElectricInductance Microhenries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricInductance.FromMicrohenries(Convert.ToDouble(value)); /// public static ElectricInductance Millihenries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricInductance.FromMillihenries(Convert.ToDouble(value)); /// public static ElectricInductance Nanohenries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricInductance.FromNanohenries(Convert.ToDouble(value)); /// public static ElectricInductance Picohenries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricInductance.FromPicohenries(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs index cb96006b46..30ea123956 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,42 +31,27 @@ public static class NumberToElectricPotentialAcExtensions { /// public static ElectricPotentialAc KilovoltsAc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialAc.FromKilovoltsAc(Convert.ToDouble(value)); /// public static ElectricPotentialAc MegavoltsAc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialAc.FromMegavoltsAc(Convert.ToDouble(value)); /// public static ElectricPotentialAc MicrovoltsAc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialAc.FromMicrovoltsAc(Convert.ToDouble(value)); /// public static ElectricPotentialAc MillivoltsAc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialAc.FromMillivoltsAc(Convert.ToDouble(value)); /// public static ElectricPotentialAc VoltsAc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialAc.FromVoltsAc(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialChangeRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialChangeRateExtensions.g.cs index 3381b64770..3a55b8f281 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialChangeRateExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialChangeRateExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,162 +31,102 @@ public static class NumberToElectricPotentialChangeRateExtensions { /// public static ElectricPotentialChangeRate KilovoltsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromKilovoltsPerHour(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate KilovoltsPerMicrosecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromKilovoltsPerMicrosecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate KilovoltsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromKilovoltsPerMinute(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate KilovoltsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromKilovoltsPerSecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MegavoltsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMegavoltsPerHour(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MegavoltsPerMicrosecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMegavoltsPerMicrosecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MegavoltsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMegavoltsPerMinute(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MegavoltsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMegavoltsPerSecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MicrovoltsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMicrovoltsPerHour(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MicrovoltsPerMicrosecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMicrovoltsPerMicrosecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MicrovoltsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMicrovoltsPerMinute(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MicrovoltsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMicrovoltsPerSecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MillivoltsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMillivoltsPerHour(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MillivoltsPerMicrosecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMillivoltsPerMicrosecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MillivoltsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMillivoltsPerMinute(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate MillivoltsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromMillivoltsPerSecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate VoltsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromVoltsPerHour(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate VoltsPerMicrosecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromVoltsPerMicrosecond(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate VoltsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromVoltsPerMinute(Convert.ToDouble(value)); /// public static ElectricPotentialChangeRate VoltsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialChangeRate.FromVoltsPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs index a8614fd5db..78f5d0a374 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,42 +31,27 @@ public static class NumberToElectricPotentialDcExtensions { /// public static ElectricPotentialDc KilovoltsDc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialDc.FromKilovoltsDc(Convert.ToDouble(value)); /// public static ElectricPotentialDc MegavoltsDc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialDc.FromMegavoltsDc(Convert.ToDouble(value)); /// public static ElectricPotentialDc MicrovoltsDc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialDc.FromMicrovoltsDc(Convert.ToDouble(value)); /// public static ElectricPotentialDc MillivoltsDc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialDc.FromMillivoltsDc(Convert.ToDouble(value)); /// public static ElectricPotentialDc VoltsDc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotentialDc.FromVoltsDc(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialExtensions.g.cs index c89a5069a6..553fbe7c00 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToElectricPotentialExtensions { /// public static ElectricPotential Kilovolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotential.FromKilovolts(Convert.ToDouble(value)); /// public static ElectricPotential Megavolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotential.FromMegavolts(Convert.ToDouble(value)); /// public static ElectricPotential Microvolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotential.FromMicrovolts(Convert.ToDouble(value)); /// public static ElectricPotential Millivolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotential.FromMillivolts(Convert.ToDouble(value)); /// public static ElectricPotential Nanovolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotential.FromNanovolts(Convert.ToDouble(value)); /// public static ElectricPotential Volts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricPotential.FromVolts(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs index 99e17110cf..bc9ec2090c 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,58 +31,37 @@ public static class NumberToElectricResistanceExtensions { /// public static ElectricResistance Gigaohms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistance.FromGigaohms(Convert.ToDouble(value)); /// public static ElectricResistance Kiloohms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistance.FromKiloohms(Convert.ToDouble(value)); /// public static ElectricResistance Megaohms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistance.FromMegaohms(Convert.ToDouble(value)); /// public static ElectricResistance Microohms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistance.FromMicroohms(Convert.ToDouble(value)); /// public static ElectricResistance Milliohms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistance.FromMilliohms(Convert.ToDouble(value)); /// public static ElectricResistance Ohms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistance.FromOhms(Convert.ToDouble(value)); /// public static ElectricResistance Teraohms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistance.FromTeraohms(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistivityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistivityExtensions.g.cs index 4beb953b18..169762e586 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistivityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistivityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,114 +31,72 @@ public static class NumberToElectricResistivityExtensions { /// public static ElectricResistivity KiloohmsCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromKiloohmsCentimeter(Convert.ToDouble(value)); /// public static ElectricResistivity KiloohmMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromKiloohmMeters(Convert.ToDouble(value)); /// public static ElectricResistivity MegaohmsCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromMegaohmsCentimeter(Convert.ToDouble(value)); /// public static ElectricResistivity MegaohmMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromMegaohmMeters(Convert.ToDouble(value)); /// public static ElectricResistivity MicroohmsCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromMicroohmsCentimeter(Convert.ToDouble(value)); /// public static ElectricResistivity MicroohmMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromMicroohmMeters(Convert.ToDouble(value)); /// public static ElectricResistivity MilliohmsCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromMilliohmsCentimeter(Convert.ToDouble(value)); /// public static ElectricResistivity MilliohmMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromMilliohmMeters(Convert.ToDouble(value)); /// public static ElectricResistivity NanoohmsCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromNanoohmsCentimeter(Convert.ToDouble(value)); /// public static ElectricResistivity NanoohmMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromNanoohmMeters(Convert.ToDouble(value)); /// public static ElectricResistivity OhmsCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromOhmsCentimeter(Convert.ToDouble(value)); /// public static ElectricResistivity OhmMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromOhmMeters(Convert.ToDouble(value)); /// public static ElectricResistivity PicoohmsCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromPicoohmsCentimeter(Convert.ToDouble(value)); /// public static ElectricResistivity PicoohmMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricResistivity.FromPicoohmMeters(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricSurfaceChargeDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricSurfaceChargeDensityExtensions.g.cs index 4324398c42..fafe10df29 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricSurfaceChargeDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricSurfaceChargeDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToElectricSurfaceChargeDensityExtensions { /// public static ElectricSurfaceChargeDensity CoulombsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricSurfaceChargeDensity.FromCoulombsPerSquareCentimeter(Convert.ToDouble(value)); /// public static ElectricSurfaceChargeDensity CoulombsPerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricSurfaceChargeDensity.FromCoulombsPerSquareInch(Convert.ToDouble(value)); /// public static ElectricSurfaceChargeDensity CoulombsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ElectricSurfaceChargeDensity.FromCoulombsPerSquareMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyDensityExtensions.g.cs index 6cc51eeee6..1ca506f0ea 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,98 +31,62 @@ public static class NumberToEnergyDensityExtensions { /// public static EnergyDensity GigajoulesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromGigajoulesPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity GigawattHoursPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromGigawattHoursPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity JoulesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromJoulesPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity KilojoulesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromKilojoulesPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity KilowattHoursPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromKilowattHoursPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity MegajoulesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromMegajoulesPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity MegawattHoursPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromMegawattHoursPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity PetajoulesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromPetajoulesPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity PetawattHoursPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromPetawattHoursPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity TerajoulesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromTerajoulesPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity TerawattHoursPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromTerawattHoursPerCubicMeter(Convert.ToDouble(value)); /// public static EnergyDensity WattHoursPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => EnergyDensity.FromWattHoursPerCubicMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyExtensions.g.cs index e07186fad8..eaa839fa0c 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToEnergyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,322 +31,202 @@ public static class NumberToEnergyExtensions { /// public static Energy BritishThermalUnits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromBritishThermalUnits(Convert.ToDouble(value)); /// public static Energy Calories(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromCalories(Convert.ToDouble(value)); /// public static Energy DecathermsEc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromDecathermsEc(Convert.ToDouble(value)); /// public static Energy DecathermsImperial(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromDecathermsImperial(Convert.ToDouble(value)); /// public static Energy DecathermsUs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromDecathermsUs(Convert.ToDouble(value)); /// public static Energy ElectronVolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromElectronVolts(Convert.ToDouble(value)); /// public static Energy Ergs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromErgs(Convert.ToDouble(value)); /// public static Energy FootPounds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromFootPounds(Convert.ToDouble(value)); /// public static Energy GigabritishThermalUnits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromGigabritishThermalUnits(Convert.ToDouble(value)); /// public static Energy GigaelectronVolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromGigaelectronVolts(Convert.ToDouble(value)); /// public static Energy Gigajoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromGigajoules(Convert.ToDouble(value)); /// public static Energy GigawattDays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromGigawattDays(Convert.ToDouble(value)); /// public static Energy GigawattHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromGigawattHours(Convert.ToDouble(value)); /// public static Energy HorsepowerHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromHorsepowerHours(Convert.ToDouble(value)); /// public static Energy Joules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromJoules(Convert.ToDouble(value)); /// public static Energy KilobritishThermalUnits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromKilobritishThermalUnits(Convert.ToDouble(value)); /// public static Energy Kilocalories(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromKilocalories(Convert.ToDouble(value)); /// public static Energy KiloelectronVolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromKiloelectronVolts(Convert.ToDouble(value)); /// public static Energy Kilojoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromKilojoules(Convert.ToDouble(value)); /// public static Energy KilowattDays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromKilowattDays(Convert.ToDouble(value)); /// public static Energy KilowattHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromKilowattHours(Convert.ToDouble(value)); /// public static Energy MegabritishThermalUnits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMegabritishThermalUnits(Convert.ToDouble(value)); /// public static Energy Megacalories(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMegacalories(Convert.ToDouble(value)); /// public static Energy MegaelectronVolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMegaelectronVolts(Convert.ToDouble(value)); /// public static Energy Megajoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMegajoules(Convert.ToDouble(value)); /// public static Energy MegawattDays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMegawattDays(Convert.ToDouble(value)); /// public static Energy MegawattHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMegawattHours(Convert.ToDouble(value)); /// public static Energy Microjoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMicrojoules(Convert.ToDouble(value)); /// public static Energy Millijoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromMillijoules(Convert.ToDouble(value)); /// public static Energy Nanojoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromNanojoules(Convert.ToDouble(value)); /// public static Energy Petajoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromPetajoules(Convert.ToDouble(value)); /// public static Energy TeraelectronVolts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromTeraelectronVolts(Convert.ToDouble(value)); /// public static Energy Terajoules(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromTerajoules(Convert.ToDouble(value)); /// public static Energy TerawattDays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromTerawattDays(Convert.ToDouble(value)); /// public static Energy TerawattHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromTerawattHours(Convert.ToDouble(value)); /// public static Energy ThermsEc(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromThermsEc(Convert.ToDouble(value)); /// public static Energy ThermsImperial(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromThermsImperial(Convert.ToDouble(value)); /// public static Energy ThermsUs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromThermsUs(Convert.ToDouble(value)); /// public static Energy WattDays(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromWattDays(Convert.ToDouble(value)); /// public static Energy WattHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Energy.FromWattHours(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToEntropyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToEntropyExtensions.g.cs index a0ccaf7096..e027aac719 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToEntropyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToEntropyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,58 +31,37 @@ public static class NumberToEntropyExtensions { /// public static Entropy CaloriesPerKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Entropy.FromCaloriesPerKelvin(Convert.ToDouble(value)); /// public static Entropy JoulesPerDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Entropy.FromJoulesPerDegreeCelsius(Convert.ToDouble(value)); /// public static Entropy JoulesPerKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Entropy.FromJoulesPerKelvin(Convert.ToDouble(value)); /// public static Entropy KilocaloriesPerKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Entropy.FromKilocaloriesPerKelvin(Convert.ToDouble(value)); /// public static Entropy KilojoulesPerDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Entropy.FromKilojoulesPerDegreeCelsius(Convert.ToDouble(value)); /// public static Entropy KilojoulesPerKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Entropy.FromKilojoulesPerKelvin(Convert.ToDouble(value)); /// public static Entropy MegajoulesPerKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Entropy.FromMegajoulesPerKelvin(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceChangeRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceChangeRateExtensions.g.cs index 1466c67707..f6fb6e070c 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceChangeRateExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceChangeRateExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,122 +31,77 @@ public static class NumberToForceChangeRateExtensions { /// public static ForceChangeRate CentinewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromCentinewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate DecanewtonsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromDecanewtonsPerMinute(Convert.ToDouble(value)); /// public static ForceChangeRate DecanewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromDecanewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate DecinewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromDecinewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate KilonewtonsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromKilonewtonsPerMinute(Convert.ToDouble(value)); /// public static ForceChangeRate KilonewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromKilonewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate KilopoundsForcePerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromKilopoundsForcePerMinute(Convert.ToDouble(value)); /// public static ForceChangeRate KilopoundsForcePerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromKilopoundsForcePerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate MicronewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromMicronewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate MillinewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromMillinewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate NanonewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromNanonewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate NewtonsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromNewtonsPerMinute(Convert.ToDouble(value)); /// public static ForceChangeRate NewtonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromNewtonsPerSecond(Convert.ToDouble(value)); /// public static ForceChangeRate PoundsForcePerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromPoundsForcePerMinute(Convert.ToDouble(value)); /// public static ForceChangeRate PoundsForcePerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForceChangeRate.FromPoundsForcePerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceExtensions.g.cs index 85f4b75944..61316dc1f6 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,122 +31,77 @@ public static class NumberToForceExtensions { /// public static Force Decanewtons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromDecanewtons(Convert.ToDouble(value)); /// public static Force Dyne(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromDyne(Convert.ToDouble(value)); /// public static Force KilogramsForce(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromKilogramsForce(Convert.ToDouble(value)); /// public static Force Kilonewtons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromKilonewtons(Convert.ToDouble(value)); /// public static Force KiloPonds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromKiloPonds(Convert.ToDouble(value)); /// public static Force KilopoundsForce(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromKilopoundsForce(Convert.ToDouble(value)); /// public static Force Meganewtons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromMeganewtons(Convert.ToDouble(value)); /// public static Force Micronewtons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromMicronewtons(Convert.ToDouble(value)); /// public static Force Millinewtons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromMillinewtons(Convert.ToDouble(value)); /// public static Force Newtons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromNewtons(Convert.ToDouble(value)); /// public static Force OunceForce(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromOunceForce(Convert.ToDouble(value)); /// public static Force Poundals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromPoundals(Convert.ToDouble(value)); /// public static Force PoundsForce(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromPoundsForce(Convert.ToDouble(value)); /// public static Force ShortTonsForce(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromShortTonsForce(Convert.ToDouble(value)); /// public static Force TonnesForce(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Force.FromTonnesForce(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs index d506a693a6..0e09a07593 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToForcePerLengthExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,306 +31,192 @@ public static class NumberToForcePerLengthExtensions { /// public static ForcePerLength CentinewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromCentinewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength CentinewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromCentinewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength CentinewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromCentinewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength DecanewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromDecanewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength DecanewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromDecanewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength DecanewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromDecanewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength DecinewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromDecinewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength DecinewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromDecinewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength DecinewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromDecinewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength KilogramsForcePerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilogramsForcePerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength KilogramsForcePerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilogramsForcePerMeter(Convert.ToDouble(value)); /// public static ForcePerLength KilogramsForcePerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilogramsForcePerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength KilonewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilonewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength KilonewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilonewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength KilonewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilonewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength KilopoundsForcePerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilopoundsForcePerFoot(Convert.ToDouble(value)); /// public static ForcePerLength KilopoundsForcePerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromKilopoundsForcePerInch(Convert.ToDouble(value)); /// public static ForcePerLength MeganewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMeganewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength MeganewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMeganewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength MeganewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMeganewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength MicronewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMicronewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength MicronewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMicronewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength MicronewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMicronewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength MillinewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMillinewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength MillinewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMillinewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength MillinewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromMillinewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength NanonewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromNanonewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength NanonewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromNanonewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength NanonewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromNanonewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength NewtonsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromNewtonsPerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength NewtonsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromNewtonsPerMeter(Convert.ToDouble(value)); /// public static ForcePerLength NewtonsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromNewtonsPerMillimeter(Convert.ToDouble(value)); /// public static ForcePerLength PoundsForcePerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromPoundsForcePerFoot(Convert.ToDouble(value)); /// public static ForcePerLength PoundsForcePerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromPoundsForcePerInch(Convert.ToDouble(value)); /// public static ForcePerLength PoundsForcePerYard(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromPoundsForcePerYard(Convert.ToDouble(value)); /// public static ForcePerLength TonnesForcePerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromTonnesForcePerCentimeter(Convert.ToDouble(value)); /// public static ForcePerLength TonnesForcePerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromTonnesForcePerMeter(Convert.ToDouble(value)); /// public static ForcePerLength TonnesForcePerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ForcePerLength.FromTonnesForcePerMillimeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToFrequencyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToFrequencyExtensions.g.cs index 3839b85f8b..4dfb48e1c1 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToFrequencyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToFrequencyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,106 +31,67 @@ public static class NumberToFrequencyExtensions { /// public static Frequency BeatsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromBeatsPerMinute(Convert.ToDouble(value)); /// public static Frequency BUnits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromBUnits(Convert.ToDouble(value)); /// public static Frequency CyclesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromCyclesPerHour(Convert.ToDouble(value)); /// public static Frequency CyclesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromCyclesPerMinute(Convert.ToDouble(value)); /// public static Frequency Gigahertz(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromGigahertz(Convert.ToDouble(value)); /// public static Frequency Hertz(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromHertz(Convert.ToDouble(value)); /// public static Frequency Kilohertz(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromKilohertz(Convert.ToDouble(value)); /// public static Frequency Megahertz(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromMegahertz(Convert.ToDouble(value)); /// public static Frequency Microhertz(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromMicrohertz(Convert.ToDouble(value)); /// public static Frequency Millihertz(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromMillihertz(Convert.ToDouble(value)); /// public static Frequency PerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromPerSecond(Convert.ToDouble(value)); /// public static Frequency RadiansPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromRadiansPerSecond(Convert.ToDouble(value)); /// public static Frequency Terahertz(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Frequency.FromTerahertz(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToFuelEfficiencyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToFuelEfficiencyExtensions.g.cs index c2db1d3139..4b8c2b4d84 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToFuelEfficiencyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToFuelEfficiencyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToFuelEfficiencyExtensions { /// public static FuelEfficiency KilometersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => FuelEfficiency.FromKilometersPerLiter(Convert.ToDouble(value)); /// public static FuelEfficiency LitersPer100Kilometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => FuelEfficiency.FromLitersPer100Kilometers(Convert.ToDouble(value)); /// public static FuelEfficiency MilesPerUkGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => FuelEfficiency.FromMilesPerUkGallon(Convert.ToDouble(value)); /// public static FuelEfficiency MilesPerUsGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => FuelEfficiency.FromMilesPerUsGallon(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatFluxExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatFluxExtensions.g.cs index 6039addde3..1cb5ddec11 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatFluxExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatFluxExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,146 +31,92 @@ public static class NumberToHeatFluxExtensions { /// public static HeatFlux BtusPerHourSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromBtusPerHourSquareFoot(Convert.ToDouble(value)); /// public static HeatFlux BtusPerMinuteSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromBtusPerMinuteSquareFoot(Convert.ToDouble(value)); /// public static HeatFlux BtusPerSecondSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromBtusPerSecondSquareFoot(Convert.ToDouble(value)); /// public static HeatFlux BtusPerSecondSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromBtusPerSecondSquareInch(Convert.ToDouble(value)); /// public static HeatFlux CaloriesPerSecondSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromCaloriesPerSecondSquareCentimeter(Convert.ToDouble(value)); /// public static HeatFlux CentiwattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromCentiwattsPerSquareMeter(Convert.ToDouble(value)); /// public static HeatFlux DeciwattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromDeciwattsPerSquareMeter(Convert.ToDouble(value)); /// public static HeatFlux KilocaloriesPerHourSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromKilocaloriesPerHourSquareMeter(Convert.ToDouble(value)); /// public static HeatFlux KilocaloriesPerSecondSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(Convert.ToDouble(value)); /// public static HeatFlux KilowattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromKilowattsPerSquareMeter(Convert.ToDouble(value)); /// public static HeatFlux MicrowattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromMicrowattsPerSquareMeter(Convert.ToDouble(value)); /// public static HeatFlux MilliwattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromMilliwattsPerSquareMeter(Convert.ToDouble(value)); /// public static HeatFlux NanowattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromNanowattsPerSquareMeter(Convert.ToDouble(value)); /// public static HeatFlux PoundsForcePerFootSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromPoundsForcePerFootSecond(Convert.ToDouble(value)); /// public static HeatFlux PoundsPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromPoundsPerSecondCubed(Convert.ToDouble(value)); /// public static HeatFlux WattsPerSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromWattsPerSquareFoot(Convert.ToDouble(value)); /// public static HeatFlux WattsPerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromWattsPerSquareInch(Convert.ToDouble(value)); /// public static HeatFlux WattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatFlux.FromWattsPerSquareMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatTransferCoefficientExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatTransferCoefficientExtensions.g.cs index 477658707c..6465b3fff2 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatTransferCoefficientExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToHeatTransferCoefficientExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,42 +31,27 @@ public static class NumberToHeatTransferCoefficientExtensions { /// public static HeatTransferCoefficient BtusPerHourSquareFootDegreeFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatTransferCoefficient.FromBtusPerHourSquareFootDegreeFahrenheit(Convert.ToDouble(value)); /// public static HeatTransferCoefficient CaloriesPerHourSquareMeterDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatTransferCoefficient.FromCaloriesPerHourSquareMeterDegreeCelsius(Convert.ToDouble(value)); /// public static HeatTransferCoefficient KilocaloriesPerHourSquareMeterDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatTransferCoefficient.FromKilocaloriesPerHourSquareMeterDegreeCelsius(Convert.ToDouble(value)); /// public static HeatTransferCoefficient WattsPerSquareMeterCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatTransferCoefficient.FromWattsPerSquareMeterCelsius(Convert.ToDouble(value)); /// public static HeatTransferCoefficient WattsPerSquareMeterKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => HeatTransferCoefficient.FromWattsPerSquareMeterKelvin(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToIlluminanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToIlluminanceExtensions.g.cs index e901c49a6a..a07b75fa69 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToIlluminanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToIlluminanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToIlluminanceExtensions { /// public static Illuminance Kilolux(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Illuminance.FromKilolux(Convert.ToDouble(value)); /// public static Illuminance Lux(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Illuminance.FromLux(Convert.ToDouble(value)); /// public static Illuminance Megalux(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Illuminance.FromMegalux(Convert.ToDouble(value)); /// public static Illuminance Millilux(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Illuminance.FromMillilux(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToImpulseExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToImpulseExtensions.g.cs index 8e48e38d3a..afeb013f08 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToImpulseExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToImpulseExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,106 +31,67 @@ public static class NumberToImpulseExtensions { /// public static Impulse CentinewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromCentinewtonSeconds(Convert.ToDouble(value)); /// public static Impulse DecanewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromDecanewtonSeconds(Convert.ToDouble(value)); /// public static Impulse DecinewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromDecinewtonSeconds(Convert.ToDouble(value)); /// public static Impulse KilogramMetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromKilogramMetersPerSecond(Convert.ToDouble(value)); /// public static Impulse KilonewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromKilonewtonSeconds(Convert.ToDouble(value)); /// public static Impulse MeganewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromMeganewtonSeconds(Convert.ToDouble(value)); /// public static Impulse MicronewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromMicronewtonSeconds(Convert.ToDouble(value)); /// public static Impulse MillinewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromMillinewtonSeconds(Convert.ToDouble(value)); /// public static Impulse NanonewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromNanonewtonSeconds(Convert.ToDouble(value)); /// public static Impulse NewtonSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromNewtonSeconds(Convert.ToDouble(value)); /// public static Impulse PoundFeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromPoundFeetPerSecond(Convert.ToDouble(value)); /// public static Impulse PoundForceSeconds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromPoundForceSeconds(Convert.ToDouble(value)); /// public static Impulse SlugFeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Impulse.FromSlugFeetPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToInformationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToInformationExtensions.g.cs index f8251dc677..c0c225750e 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToInformationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToInformationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,210 +31,132 @@ public static class NumberToInformationExtensions { /// public static Information Bits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromBits(Convert.ToDouble(value)); /// public static Information Bytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromBytes(Convert.ToDouble(value)); /// public static Information Exabits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromExabits(Convert.ToDouble(value)); /// public static Information Exabytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromExabytes(Convert.ToDouble(value)); /// public static Information Exbibits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromExbibits(Convert.ToDouble(value)); /// public static Information Exbibytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromExbibytes(Convert.ToDouble(value)); /// public static Information Gibibits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromGibibits(Convert.ToDouble(value)); /// public static Information Gibibytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromGibibytes(Convert.ToDouble(value)); /// public static Information Gigabits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromGigabits(Convert.ToDouble(value)); /// public static Information Gigabytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromGigabytes(Convert.ToDouble(value)); /// public static Information Kibibits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromKibibits(Convert.ToDouble(value)); /// public static Information Kibibytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromKibibytes(Convert.ToDouble(value)); /// public static Information Kilobits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromKilobits(Convert.ToDouble(value)); /// public static Information Kilobytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromKilobytes(Convert.ToDouble(value)); /// public static Information Mebibits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromMebibits(Convert.ToDouble(value)); /// public static Information Mebibytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromMebibytes(Convert.ToDouble(value)); /// public static Information Megabits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromMegabits(Convert.ToDouble(value)); /// public static Information Megabytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromMegabytes(Convert.ToDouble(value)); /// public static Information Pebibits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromPebibits(Convert.ToDouble(value)); /// public static Information Pebibytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromPebibytes(Convert.ToDouble(value)); /// public static Information Petabits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromPetabits(Convert.ToDouble(value)); /// public static Information Petabytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromPetabytes(Convert.ToDouble(value)); /// public static Information Tebibits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromTebibits(Convert.ToDouble(value)); /// public static Information Tebibytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromTebibytes(Convert.ToDouble(value)); /// public static Information Terabits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromTerabits(Convert.ToDouble(value)); /// public static Information Terabytes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Information.FromTerabytes(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradianceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradianceExtensions.g.cs index cd54959d81..bfc384441f 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradianceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradianceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,114 +31,72 @@ public static class NumberToIrradianceExtensions { /// public static Irradiance KilowattsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromKilowattsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiance KilowattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromKilowattsPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiance MegawattsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromMegawattsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiance MegawattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromMegawattsPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiance MicrowattsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromMicrowattsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiance MicrowattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromMicrowattsPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiance MilliwattsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromMilliwattsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiance MilliwattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromMilliwattsPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiance NanowattsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromNanowattsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiance NanowattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromNanowattsPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiance PicowattsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromPicowattsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiance PicowattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromPicowattsPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiance WattsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromWattsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiance WattsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiance.FromWattsPerSquareMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradiationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradiationExtensions.g.cs index 56c114cc94..bb4dde3b62 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradiationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToIrradiationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,58 +31,37 @@ public static class NumberToIrradiationExtensions { /// public static Irradiation JoulesPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiation.FromJoulesPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiation JoulesPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiation.FromJoulesPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiation JoulesPerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiation.FromJoulesPerSquareMillimeter(Convert.ToDouble(value)); /// public static Irradiation KilojoulesPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiation.FromKilojoulesPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiation KilowattHoursPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiation.FromKilowattHoursPerSquareMeter(Convert.ToDouble(value)); /// public static Irradiation MillijoulesPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiation.FromMillijoulesPerSquareCentimeter(Convert.ToDouble(value)); /// public static Irradiation WattHoursPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Irradiation.FromWattHoursPerSquareMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToJerkExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToJerkExtensions.g.cs index fca1b8986b..ec33579e04 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToJerkExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToJerkExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,90 +31,57 @@ public static class NumberToJerkExtensions { /// public static Jerk CentimetersPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromCentimetersPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk DecimetersPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromDecimetersPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk FeetPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromFeetPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk InchesPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromInchesPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk KilometersPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromKilometersPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk MetersPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromMetersPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk MicrometersPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromMicrometersPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk MillimetersPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromMillimetersPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk MillistandardGravitiesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromMillistandardGravitiesPerSecond(Convert.ToDouble(value)); /// public static Jerk NanometersPerSecondCubed(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromNanometersPerSecondCubed(Convert.ToDouble(value)); /// public static Jerk StandardGravitiesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Jerk.FromStandardGravitiesPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToKinematicViscosityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToKinematicViscosityExtensions.g.cs index c6f829f8cd..41a5dab714 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToKinematicViscosityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToKinematicViscosityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToKinematicViscosityExtensions { /// public static KinematicViscosity Centistokes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromCentistokes(Convert.ToDouble(value)); /// public static KinematicViscosity Decistokes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromDecistokes(Convert.ToDouble(value)); /// public static KinematicViscosity Kilostokes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromKilostokes(Convert.ToDouble(value)); /// public static KinematicViscosity Microstokes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromMicrostokes(Convert.ToDouble(value)); /// public static KinematicViscosity Millistokes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromMillistokes(Convert.ToDouble(value)); /// public static KinematicViscosity Nanostokes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromNanostokes(Convert.ToDouble(value)); /// public static KinematicViscosity SquareFeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromSquareFeetPerSecond(Convert.ToDouble(value)); /// public static KinematicViscosity SquareMetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromSquareMetersPerSecond(Convert.ToDouble(value)); /// public static KinematicViscosity Stokes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => KinematicViscosity.FromStokes(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLeakRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLeakRateExtensions.g.cs index da9bdbf25d..947c44a4e1 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLeakRateExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLeakRateExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToLeakRateExtensions { /// public static LeakRate MillibarLitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LeakRate.FromMillibarLitersPerSecond(Convert.ToDouble(value)); /// public static LeakRate PascalCubicMetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LeakRate.FromPascalCubicMetersPerSecond(Convert.ToDouble(value)); /// public static LeakRate TorrLitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LeakRate.FromTorrLitersPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLengthExtensions.g.cs index d15563ea80..da3aad5e17 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLengthExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,338 +31,212 @@ public static class NumberToLengthExtensions { /// public static Length Angstroms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromAngstroms(Convert.ToDouble(value)); /// public static Length AstronomicalUnits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromAstronomicalUnits(Convert.ToDouble(value)); /// public static Length Centimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromCentimeters(Convert.ToDouble(value)); /// public static Length Chains(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromChains(Convert.ToDouble(value)); /// public static Length DataMiles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromDataMiles(Convert.ToDouble(value)); /// public static Length Decameters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromDecameters(Convert.ToDouble(value)); /// public static Length Decimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromDecimeters(Convert.ToDouble(value)); /// public static Length DtpPicas(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromDtpPicas(Convert.ToDouble(value)); /// public static Length DtpPoints(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromDtpPoints(Convert.ToDouble(value)); /// public static Length Fathoms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromFathoms(Convert.ToDouble(value)); /// public static Length Femtometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromFemtometers(Convert.ToDouble(value)); /// public static Length Feet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromFeet(Convert.ToDouble(value)); /// public static Length Gigameters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromGigameters(Convert.ToDouble(value)); /// public static Length Hands(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromHands(Convert.ToDouble(value)); /// public static Length Hectometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromHectometers(Convert.ToDouble(value)); /// public static Length Inches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromInches(Convert.ToDouble(value)); /// public static Length Kilofeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromKilofeet(Convert.ToDouble(value)); /// public static Length KilolightYears(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromKilolightYears(Convert.ToDouble(value)); /// public static Length Kilometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromKilometers(Convert.ToDouble(value)); /// public static Length Kiloparsecs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromKiloparsecs(Convert.ToDouble(value)); /// public static Length Kiloyards(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromKiloyards(Convert.ToDouble(value)); /// public static Length LightYears(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromLightYears(Convert.ToDouble(value)); /// public static Length MegalightYears(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMegalightYears(Convert.ToDouble(value)); /// public static Length Megameters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMegameters(Convert.ToDouble(value)); /// public static Length Megaparsecs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMegaparsecs(Convert.ToDouble(value)); /// public static Length Meters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMeters(Convert.ToDouble(value)); /// public static Length Microinches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMicroinches(Convert.ToDouble(value)); /// public static Length Micrometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMicrometers(Convert.ToDouble(value)); /// public static Length Mils(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMils(Convert.ToDouble(value)); /// public static Length Miles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMiles(Convert.ToDouble(value)); /// public static Length Millimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromMillimeters(Convert.ToDouble(value)); /// public static Length Nanometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromNanometers(Convert.ToDouble(value)); /// public static Length NauticalMiles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromNauticalMiles(Convert.ToDouble(value)); /// public static Length Parsecs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromParsecs(Convert.ToDouble(value)); /// public static Length Picometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromPicometers(Convert.ToDouble(value)); /// public static Length PrinterPicas(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromPrinterPicas(Convert.ToDouble(value)); /// public static Length PrinterPoints(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromPrinterPoints(Convert.ToDouble(value)); /// public static Length Shackles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromShackles(Convert.ToDouble(value)); /// public static Length SolarRadiuses(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromSolarRadiuses(Convert.ToDouble(value)); /// public static Length Twips(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromTwips(Convert.ToDouble(value)); /// public static Length UsSurveyFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromUsSurveyFeet(Convert.ToDouble(value)); /// public static Length Yards(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Length.FromYards(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLevelExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLevelExtensions.g.cs index 3d1c71a5c6..2b138fa007 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLevelExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLevelExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,18 +31,12 @@ public static class NumberToLevelExtensions { /// public static Level Decibels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Level.FromDecibels(Convert.ToDouble(value)); /// public static Level Nepers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Level.FromNepers(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearDensityExtensions.g.cs index b86df0fd24..03d2e707a9 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,114 +31,72 @@ public static class NumberToLinearDensityExtensions { /// public static LinearDensity GramsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromGramsPerCentimeter(Convert.ToDouble(value)); /// public static LinearDensity GramsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromGramsPerMeter(Convert.ToDouble(value)); /// public static LinearDensity GramsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromGramsPerMillimeter(Convert.ToDouble(value)); /// public static LinearDensity KilogramsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromKilogramsPerCentimeter(Convert.ToDouble(value)); /// public static LinearDensity KilogramsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromKilogramsPerMeter(Convert.ToDouble(value)); /// public static LinearDensity KilogramsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromKilogramsPerMillimeter(Convert.ToDouble(value)); /// public static LinearDensity MicrogramsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromMicrogramsPerCentimeter(Convert.ToDouble(value)); /// public static LinearDensity MicrogramsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromMicrogramsPerMeter(Convert.ToDouble(value)); /// public static LinearDensity MicrogramsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromMicrogramsPerMillimeter(Convert.ToDouble(value)); /// public static LinearDensity MilligramsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromMilligramsPerCentimeter(Convert.ToDouble(value)); /// public static LinearDensity MilligramsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromMilligramsPerMeter(Convert.ToDouble(value)); /// public static LinearDensity MilligramsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromMilligramsPerMillimeter(Convert.ToDouble(value)); /// public static LinearDensity PoundsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromPoundsPerFoot(Convert.ToDouble(value)); /// public static LinearDensity PoundsPerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearDensity.FromPoundsPerInch(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearPowerDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearPowerDensityExtensions.g.cs index 053dfdd3bb..0b0776b938 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearPowerDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLinearPowerDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,202 +31,127 @@ public static class NumberToLinearPowerDensityExtensions { /// public static LinearPowerDensity GigawattsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromGigawattsPerCentimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity GigawattsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromGigawattsPerFoot(Convert.ToDouble(value)); /// public static LinearPowerDensity GigawattsPerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromGigawattsPerInch(Convert.ToDouble(value)); /// public static LinearPowerDensity GigawattsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromGigawattsPerMeter(Convert.ToDouble(value)); /// public static LinearPowerDensity GigawattsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromGigawattsPerMillimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity KilowattsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromKilowattsPerCentimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity KilowattsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromKilowattsPerFoot(Convert.ToDouble(value)); /// public static LinearPowerDensity KilowattsPerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromKilowattsPerInch(Convert.ToDouble(value)); /// public static LinearPowerDensity KilowattsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromKilowattsPerMeter(Convert.ToDouble(value)); /// public static LinearPowerDensity KilowattsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromKilowattsPerMillimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity MegawattsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMegawattsPerCentimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity MegawattsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMegawattsPerFoot(Convert.ToDouble(value)); /// public static LinearPowerDensity MegawattsPerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMegawattsPerInch(Convert.ToDouble(value)); /// public static LinearPowerDensity MegawattsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMegawattsPerMeter(Convert.ToDouble(value)); /// public static LinearPowerDensity MegawattsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMegawattsPerMillimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity MilliwattsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMilliwattsPerCentimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity MilliwattsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMilliwattsPerFoot(Convert.ToDouble(value)); /// public static LinearPowerDensity MilliwattsPerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMilliwattsPerInch(Convert.ToDouble(value)); /// public static LinearPowerDensity MilliwattsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMilliwattsPerMeter(Convert.ToDouble(value)); /// public static LinearPowerDensity MilliwattsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromMilliwattsPerMillimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity WattsPerCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromWattsPerCentimeter(Convert.ToDouble(value)); /// public static LinearPowerDensity WattsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromWattsPerFoot(Convert.ToDouble(value)); /// public static LinearPowerDensity WattsPerInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromWattsPerInch(Convert.ToDouble(value)); /// public static LinearPowerDensity WattsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromWattsPerMeter(Convert.ToDouble(value)); /// public static LinearPowerDensity WattsPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LinearPowerDensity.FromWattsPerMillimeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminanceExtensions.g.cs index 8a465149e9..4450f2e9f3 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,82 +31,52 @@ public static class NumberToLuminanceExtensions { /// public static Luminance CandelasPerSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromCandelasPerSquareFoot(Convert.ToDouble(value)); /// public static Luminance CandelasPerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromCandelasPerSquareInch(Convert.ToDouble(value)); /// public static Luminance CandelasPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromCandelasPerSquareMeter(Convert.ToDouble(value)); /// public static Luminance CenticandelasPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromCenticandelasPerSquareMeter(Convert.ToDouble(value)); /// public static Luminance DecicandelasPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromDecicandelasPerSquareMeter(Convert.ToDouble(value)); /// public static Luminance KilocandelasPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromKilocandelasPerSquareMeter(Convert.ToDouble(value)); /// public static Luminance MicrocandelasPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromMicrocandelasPerSquareMeter(Convert.ToDouble(value)); /// public static Luminance MillicandelasPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromMillicandelasPerSquareMeter(Convert.ToDouble(value)); /// public static Luminance NanocandelasPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromNanocandelasPerSquareMeter(Convert.ToDouble(value)); /// public static Luminance Nits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminance.FromNits(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminosityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminosityExtensions.g.cs index 36b11e2995..475fb37ba3 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminosityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminosityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,114 +31,72 @@ public static class NumberToLuminosityExtensions { /// public static Luminosity Decawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromDecawatts(Convert.ToDouble(value)); /// public static Luminosity Deciwatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromDeciwatts(Convert.ToDouble(value)); /// public static Luminosity Femtowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromFemtowatts(Convert.ToDouble(value)); /// public static Luminosity Gigawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromGigawatts(Convert.ToDouble(value)); /// public static Luminosity Kilowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromKilowatts(Convert.ToDouble(value)); /// public static Luminosity Megawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromMegawatts(Convert.ToDouble(value)); /// public static Luminosity Microwatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromMicrowatts(Convert.ToDouble(value)); /// public static Luminosity Milliwatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromMilliwatts(Convert.ToDouble(value)); /// public static Luminosity Nanowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromNanowatts(Convert.ToDouble(value)); /// public static Luminosity Petawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromPetawatts(Convert.ToDouble(value)); /// public static Luminosity Picowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromPicowatts(Convert.ToDouble(value)); /// public static Luminosity SolarLuminosities(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromSolarLuminosities(Convert.ToDouble(value)); /// public static Luminosity Terawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromTerawatts(Convert.ToDouble(value)); /// public static Luminosity Watts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Luminosity.FromWatts(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousFluxExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousFluxExtensions.g.cs index dd13f7f308..2865384fc8 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousFluxExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousFluxExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToLuminousFluxExtensions { /// public static LuminousFlux Lumens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LuminousFlux.FromLumens(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousIntensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousIntensityExtensions.g.cs index 724e6f1f69..f6d3ff1614 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousIntensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToLuminousIntensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToLuminousIntensityExtensions { /// public static LuminousIntensity Candela(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => LuminousIntensity.FromCandela(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFieldExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFieldExtensions.g.cs index 67043e22b6..92df941bfc 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFieldExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFieldExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToMagneticFieldExtensions { /// public static MagneticField Gausses(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MagneticField.FromGausses(Convert.ToDouble(value)); /// public static MagneticField Microteslas(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MagneticField.FromMicroteslas(Convert.ToDouble(value)); /// public static MagneticField Milligausses(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MagneticField.FromMilligausses(Convert.ToDouble(value)); /// public static MagneticField Milliteslas(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MagneticField.FromMilliteslas(Convert.ToDouble(value)); /// public static MagneticField Nanoteslas(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MagneticField.FromNanoteslas(Convert.ToDouble(value)); /// public static MagneticField Teslas(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MagneticField.FromTeslas(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFluxExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFluxExtensions.g.cs index 2c6e19b2b2..5a7965cfb2 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFluxExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagneticFluxExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToMagneticFluxExtensions { /// public static MagneticFlux Webers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MagneticFlux.FromWebers(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagnetizationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagnetizationExtensions.g.cs index 114346ec96..e17f7fc145 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagnetizationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMagnetizationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToMagnetizationExtensions { /// public static Magnetization AmperesPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Magnetization.FromAmperesPerMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassConcentrationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassConcentrationExtensions.g.cs index 6f8b73c46f..52efbfefab 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassConcentrationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassConcentrationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,394 +31,247 @@ public static class NumberToMassConcentrationExtensions { /// public static MassConcentration CentigramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromCentigramsPerDeciliter(Convert.ToDouble(value)); /// public static MassConcentration CentigramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromCentigramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration CentigramsPerMicroliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromCentigramsPerMicroliter(Convert.ToDouble(value)); /// public static MassConcentration CentigramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromCentigramsPerMilliliter(Convert.ToDouble(value)); /// public static MassConcentration DecigramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromDecigramsPerDeciliter(Convert.ToDouble(value)); /// public static MassConcentration DecigramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromDecigramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration DecigramsPerMicroliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromDecigramsPerMicroliter(Convert.ToDouble(value)); /// public static MassConcentration DecigramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromDecigramsPerMilliliter(Convert.ToDouble(value)); /// public static MassConcentration GramsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromGramsPerCubicCentimeter(Convert.ToDouble(value)); /// public static MassConcentration GramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromGramsPerCubicMeter(Convert.ToDouble(value)); /// public static MassConcentration GramsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromGramsPerCubicMillimeter(Convert.ToDouble(value)); /// public static MassConcentration GramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromGramsPerDeciliter(Convert.ToDouble(value)); /// public static MassConcentration GramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromGramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration GramsPerMicroliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromGramsPerMicroliter(Convert.ToDouble(value)); /// public static MassConcentration GramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromGramsPerMilliliter(Convert.ToDouble(value)); /// public static MassConcentration KilogramsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromKilogramsPerCubicCentimeter(Convert.ToDouble(value)); /// public static MassConcentration KilogramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromKilogramsPerCubicMeter(Convert.ToDouble(value)); /// public static MassConcentration KilogramsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromKilogramsPerCubicMillimeter(Convert.ToDouble(value)); /// public static MassConcentration KilogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromKilogramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration KilopoundsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromKilopoundsPerCubicFoot(Convert.ToDouble(value)); /// public static MassConcentration KilopoundsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromKilopoundsPerCubicInch(Convert.ToDouble(value)); /// public static MassConcentration MicrogramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMicrogramsPerCubicMeter(Convert.ToDouble(value)); /// public static MassConcentration MicrogramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMicrogramsPerDeciliter(Convert.ToDouble(value)); /// public static MassConcentration MicrogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMicrogramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration MicrogramsPerMicroliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMicrogramsPerMicroliter(Convert.ToDouble(value)); /// public static MassConcentration MicrogramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMicrogramsPerMilliliter(Convert.ToDouble(value)); /// public static MassConcentration MilligramsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMilligramsPerCubicMeter(Convert.ToDouble(value)); /// public static MassConcentration MilligramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMilligramsPerDeciliter(Convert.ToDouble(value)); /// public static MassConcentration MilligramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMilligramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration MilligramsPerMicroliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMilligramsPerMicroliter(Convert.ToDouble(value)); /// public static MassConcentration MilligramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromMilligramsPerMilliliter(Convert.ToDouble(value)); /// public static MassConcentration NanogramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromNanogramsPerDeciliter(Convert.ToDouble(value)); /// public static MassConcentration NanogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromNanogramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration NanogramsPerMicroliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromNanogramsPerMicroliter(Convert.ToDouble(value)); /// public static MassConcentration NanogramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromNanogramsPerMilliliter(Convert.ToDouble(value)); /// public static MassConcentration OuncesPerImperialGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromOuncesPerImperialGallon(Convert.ToDouble(value)); /// public static MassConcentration OuncesPerUSGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromOuncesPerUSGallon(Convert.ToDouble(value)); /// public static MassConcentration PicogramsPerDeciliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPicogramsPerDeciliter(Convert.ToDouble(value)); /// public static MassConcentration PicogramsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPicogramsPerLiter(Convert.ToDouble(value)); /// public static MassConcentration PicogramsPerMicroliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPicogramsPerMicroliter(Convert.ToDouble(value)); /// public static MassConcentration PicogramsPerMilliliter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPicogramsPerMilliliter(Convert.ToDouble(value)); /// public static MassConcentration PoundsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPoundsPerCubicFoot(Convert.ToDouble(value)); /// public static MassConcentration PoundsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPoundsPerCubicInch(Convert.ToDouble(value)); /// public static MassConcentration PoundsPerImperialGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPoundsPerImperialGallon(Convert.ToDouble(value)); /// public static MassConcentration PoundsPerUSGallon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromPoundsPerUSGallon(Convert.ToDouble(value)); /// public static MassConcentration SlugsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromSlugsPerCubicFoot(Convert.ToDouble(value)); /// public static MassConcentration TonnesPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromTonnesPerCubicCentimeter(Convert.ToDouble(value)); /// public static MassConcentration TonnesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromTonnesPerCubicMeter(Convert.ToDouble(value)); /// public static MassConcentration TonnesPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassConcentration.FromTonnesPerCubicMillimeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassExtensions.g.cs index f170ad547f..36339f5dd6 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,218 +31,137 @@ public static class NumberToMassExtensions { /// public static Mass Centigrams(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromCentigrams(Convert.ToDouble(value)); /// public static Mass Decagrams(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromDecagrams(Convert.ToDouble(value)); /// public static Mass Decigrams(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromDecigrams(Convert.ToDouble(value)); /// public static Mass EarthMasses(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromEarthMasses(Convert.ToDouble(value)); /// public static Mass Femtograms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromFemtograms(Convert.ToDouble(value)); /// public static Mass Grains(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromGrains(Convert.ToDouble(value)); /// public static Mass Grams(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromGrams(Convert.ToDouble(value)); /// public static Mass Hectograms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromHectograms(Convert.ToDouble(value)); /// public static Mass Kilograms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromKilograms(Convert.ToDouble(value)); /// public static Mass Kilopounds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromKilopounds(Convert.ToDouble(value)); /// public static Mass Kilotonnes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromKilotonnes(Convert.ToDouble(value)); /// public static Mass LongHundredweight(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromLongHundredweight(Convert.ToDouble(value)); /// public static Mass LongTons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromLongTons(Convert.ToDouble(value)); /// public static Mass Megapounds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromMegapounds(Convert.ToDouble(value)); /// public static Mass Megatonnes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromMegatonnes(Convert.ToDouble(value)); /// public static Mass Micrograms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromMicrograms(Convert.ToDouble(value)); /// public static Mass Milligrams(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromMilligrams(Convert.ToDouble(value)); /// public static Mass Nanograms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromNanograms(Convert.ToDouble(value)); /// public static Mass Ounces(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromOunces(Convert.ToDouble(value)); /// public static Mass Picograms(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromPicograms(Convert.ToDouble(value)); /// public static Mass Pounds(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromPounds(Convert.ToDouble(value)); /// public static Mass ShortHundredweight(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromShortHundredweight(Convert.ToDouble(value)); /// public static Mass ShortTons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromShortTons(Convert.ToDouble(value)); /// public static Mass Slugs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromSlugs(Convert.ToDouble(value)); /// public static Mass SolarMasses(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromSolarMasses(Convert.ToDouble(value)); /// public static Mass Stone(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromStone(Convert.ToDouble(value)); /// public static Mass Tonnes(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Mass.FromTonnes(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFlowExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFlowExtensions.g.cs index 3f75371a85..05e5007442 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFlowExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFlowExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,266 +31,167 @@ public static class NumberToMassFlowExtensions { /// public static MassFlow CentigramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromCentigramsPerDay(Convert.ToDouble(value)); /// public static MassFlow CentigramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromCentigramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow DecagramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromDecagramsPerDay(Convert.ToDouble(value)); /// public static MassFlow DecagramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromDecagramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow DecigramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromDecigramsPerDay(Convert.ToDouble(value)); /// public static MassFlow DecigramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromDecigramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow GramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromGramsPerDay(Convert.ToDouble(value)); /// public static MassFlow GramsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromGramsPerHour(Convert.ToDouble(value)); /// public static MassFlow GramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromGramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow HectogramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromHectogramsPerDay(Convert.ToDouble(value)); /// public static MassFlow HectogramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromHectogramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow KilogramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromKilogramsPerDay(Convert.ToDouble(value)); /// public static MassFlow KilogramsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromKilogramsPerHour(Convert.ToDouble(value)); /// public static MassFlow KilogramsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromKilogramsPerMinute(Convert.ToDouble(value)); /// public static MassFlow KilogramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromKilogramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow MegagramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMegagramsPerDay(Convert.ToDouble(value)); /// public static MassFlow MegapoundsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMegapoundsPerDay(Convert.ToDouble(value)); /// public static MassFlow MegapoundsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMegapoundsPerHour(Convert.ToDouble(value)); /// public static MassFlow MegapoundsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMegapoundsPerMinute(Convert.ToDouble(value)); /// public static MassFlow MegapoundsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMegapoundsPerSecond(Convert.ToDouble(value)); /// public static MassFlow MicrogramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMicrogramsPerDay(Convert.ToDouble(value)); /// public static MassFlow MicrogramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMicrogramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow MilligramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMilligramsPerDay(Convert.ToDouble(value)); /// public static MassFlow MilligramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromMilligramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow NanogramsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromNanogramsPerDay(Convert.ToDouble(value)); /// public static MassFlow NanogramsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromNanogramsPerSecond(Convert.ToDouble(value)); /// public static MassFlow PoundsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromPoundsPerDay(Convert.ToDouble(value)); /// public static MassFlow PoundsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromPoundsPerHour(Convert.ToDouble(value)); /// public static MassFlow PoundsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromPoundsPerMinute(Convert.ToDouble(value)); /// public static MassFlow PoundsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromPoundsPerSecond(Convert.ToDouble(value)); /// public static MassFlow ShortTonsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromShortTonsPerHour(Convert.ToDouble(value)); /// public static MassFlow TonnesPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromTonnesPerDay(Convert.ToDouble(value)); /// public static MassFlow TonnesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlow.FromTonnesPerHour(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFluxExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFluxExtensions.g.cs index 2e8c63df81..d45840d0a3 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFluxExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFluxExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,98 +31,62 @@ public static class NumberToMassFluxExtensions { /// public static MassFlux GramsPerHourPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromGramsPerHourPerSquareCentimeter(Convert.ToDouble(value)); /// public static MassFlux GramsPerHourPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromGramsPerHourPerSquareMeter(Convert.ToDouble(value)); /// public static MassFlux GramsPerHourPerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromGramsPerHourPerSquareMillimeter(Convert.ToDouble(value)); /// public static MassFlux GramsPerSecondPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromGramsPerSecondPerSquareCentimeter(Convert.ToDouble(value)); /// public static MassFlux GramsPerSecondPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromGramsPerSecondPerSquareMeter(Convert.ToDouble(value)); /// public static MassFlux GramsPerSecondPerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromGramsPerSecondPerSquareMillimeter(Convert.ToDouble(value)); /// public static MassFlux KilogramsPerHourPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromKilogramsPerHourPerSquareCentimeter(Convert.ToDouble(value)); /// public static MassFlux KilogramsPerHourPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromKilogramsPerHourPerSquareMeter(Convert.ToDouble(value)); /// public static MassFlux KilogramsPerHourPerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromKilogramsPerHourPerSquareMillimeter(Convert.ToDouble(value)); /// public static MassFlux KilogramsPerSecondPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromKilogramsPerSecondPerSquareCentimeter(Convert.ToDouble(value)); /// public static MassFlux KilogramsPerSecondPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromKilogramsPerSecondPerSquareMeter(Convert.ToDouble(value)); /// public static MassFlux KilogramsPerSecondPerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFlux.FromKilogramsPerSecondPerSquareMillimeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFractionExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFractionExtensions.g.cs index 6f499b2090..7ea498b522 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFractionExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassFractionExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,194 +31,122 @@ public static class NumberToMassFractionExtensions { /// public static MassFraction CentigramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromCentigramsPerGram(Convert.ToDouble(value)); /// public static MassFraction CentigramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromCentigramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction DecagramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromDecagramsPerGram(Convert.ToDouble(value)); /// public static MassFraction DecagramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromDecagramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction DecigramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromDecigramsPerGram(Convert.ToDouble(value)); /// public static MassFraction DecigramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromDecigramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction DecimalFractions(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromDecimalFractions(Convert.ToDouble(value)); /// public static MassFraction GramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromGramsPerGram(Convert.ToDouble(value)); /// public static MassFraction GramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromGramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction HectogramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromHectogramsPerGram(Convert.ToDouble(value)); /// public static MassFraction HectogramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromHectogramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction KilogramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromKilogramsPerGram(Convert.ToDouble(value)); /// public static MassFraction KilogramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromKilogramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction MicrogramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromMicrogramsPerGram(Convert.ToDouble(value)); /// public static MassFraction MicrogramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromMicrogramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction MilligramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromMilligramsPerGram(Convert.ToDouble(value)); /// public static MassFraction MilligramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromMilligramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction NanogramsPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromNanogramsPerGram(Convert.ToDouble(value)); /// public static MassFraction NanogramsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromNanogramsPerKilogram(Convert.ToDouble(value)); /// public static MassFraction PartsPerBillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromPartsPerBillion(Convert.ToDouble(value)); /// public static MassFraction PartsPerMillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromPartsPerMillion(Convert.ToDouble(value)); /// public static MassFraction PartsPerThousand(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromPartsPerThousand(Convert.ToDouble(value)); /// public static MassFraction PartsPerTrillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromPartsPerTrillion(Convert.ToDouble(value)); /// public static MassFraction Percent(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassFraction.FromPercent(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassMomentOfInertiaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassMomentOfInertiaExtensions.g.cs index 1aae922769..f15227c8b4 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassMomentOfInertiaExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMassMomentOfInertiaExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,226 +31,142 @@ public static class NumberToMassMomentOfInertiaExtensions { /// public static MassMomentOfInertia GramSquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromGramSquareCentimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia GramSquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromGramSquareDecimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia GramSquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromGramSquareMeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia GramSquareMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromGramSquareMillimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilogramSquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilogramSquareCentimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilogramSquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilogramSquareDecimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilogramSquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilogramSquareMeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilogramSquareMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilogramSquareMillimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilotonneSquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilotonneSquareCentimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilotonneSquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilotonneSquareDecimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilotonneSquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilotonneSquareMeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia KilotonneSquareMilimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromKilotonneSquareMilimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MegatonneSquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMegatonneSquareCentimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MegatonneSquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMegatonneSquareDecimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MegatonneSquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMegatonneSquareMeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MegatonneSquareMilimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMegatonneSquareMilimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MilligramSquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMilligramSquareCentimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MilligramSquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMilligramSquareDecimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MilligramSquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMilligramSquareMeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia MilligramSquareMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromMilligramSquareMillimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia PoundSquareFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromPoundSquareFeet(Convert.ToDouble(value)); /// public static MassMomentOfInertia PoundSquareInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromPoundSquareInches(Convert.ToDouble(value)); /// public static MassMomentOfInertia SlugSquareFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromSlugSquareFeet(Convert.ToDouble(value)); /// public static MassMomentOfInertia SlugSquareInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromSlugSquareInches(Convert.ToDouble(value)); /// public static MassMomentOfInertia TonneSquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromTonneSquareCentimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia TonneSquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromTonneSquareDecimeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia TonneSquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromTonneSquareMeters(Convert.ToDouble(value)); /// public static MassMomentOfInertia TonneSquareMilimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MassMomentOfInertia.FromTonneSquareMilimeters(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolalityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolalityExtensions.g.cs index ce9fd27d4a..3fd0311764 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolalityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolalityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,18 +31,12 @@ public static class NumberToMolalityExtensions { /// public static Molality MolesPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molality.FromMolesPerGram(Convert.ToDouble(value)); /// public static Molality MolesPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molality.FromMolesPerKilogram(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEnergyExtensions.g.cs index caf2e58733..6e4e080f9f 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEnergyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEnergyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToMolarEnergyExtensions { /// public static MolarEnergy JoulesPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarEnergy.FromJoulesPerMole(Convert.ToDouble(value)); /// public static MolarEnergy KilojoulesPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarEnergy.FromKilojoulesPerMole(Convert.ToDouble(value)); /// public static MolarEnergy MegajoulesPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarEnergy.FromMegajoulesPerMole(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEntropyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEntropyExtensions.g.cs index 27264a55b3..eaf05f4564 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEntropyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarEntropyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToMolarEntropyExtensions { /// public static MolarEntropy JoulesPerMoleKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarEntropy.FromJoulesPerMoleKelvin(Convert.ToDouble(value)); /// public static MolarEntropy KilojoulesPerMoleKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarEntropy.FromKilojoulesPerMoleKelvin(Convert.ToDouble(value)); /// public static MolarEntropy MegajoulesPerMoleKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarEntropy.FromMegajoulesPerMoleKelvin(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarFlowExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarFlowExtensions.g.cs index 0b2ab19d42..f889d88b07 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarFlowExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarFlowExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToMolarFlowExtensions { /// public static MolarFlow KilomolesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromKilomolesPerHour(Convert.ToDouble(value)); /// public static MolarFlow KilomolesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromKilomolesPerMinute(Convert.ToDouble(value)); /// public static MolarFlow KilomolesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromKilomolesPerSecond(Convert.ToDouble(value)); /// public static MolarFlow MolesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromMolesPerHour(Convert.ToDouble(value)); /// public static MolarFlow MolesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromMolesPerMinute(Convert.ToDouble(value)); /// public static MolarFlow MolesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromMolesPerSecond(Convert.ToDouble(value)); /// public static MolarFlow PoundMolesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromPoundMolesPerHour(Convert.ToDouble(value)); /// public static MolarFlow PoundMolesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromPoundMolesPerMinute(Convert.ToDouble(value)); /// public static MolarFlow PoundMolesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarFlow.FromPoundMolesPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarMassExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarMassExtensions.g.cs index 42daf96a91..4994739eec 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarMassExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarMassExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,106 +31,67 @@ public static class NumberToMolarMassExtensions { /// public static MolarMass CentigramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromCentigramsPerMole(Convert.ToDouble(value)); /// public static MolarMass DecagramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromDecagramsPerMole(Convert.ToDouble(value)); /// public static MolarMass DecigramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromDecigramsPerMole(Convert.ToDouble(value)); /// public static MolarMass GramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromGramsPerMole(Convert.ToDouble(value)); /// public static MolarMass HectogramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromHectogramsPerMole(Convert.ToDouble(value)); /// public static MolarMass KilogramsPerKilomole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromKilogramsPerKilomole(Convert.ToDouble(value)); /// public static MolarMass KilogramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromKilogramsPerMole(Convert.ToDouble(value)); /// public static MolarMass KilopoundsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromKilopoundsPerMole(Convert.ToDouble(value)); /// public static MolarMass MegapoundsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromMegapoundsPerMole(Convert.ToDouble(value)); /// public static MolarMass MicrogramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromMicrogramsPerMole(Convert.ToDouble(value)); /// public static MolarMass MilligramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromMilligramsPerMole(Convert.ToDouble(value)); /// public static MolarMass NanogramsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromNanogramsPerMole(Convert.ToDouble(value)); /// public static MolarMass PoundsPerMole(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => MolarMass.FromPoundsPerMole(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarityExtensions.g.cs index eb2f51f2bb..9f2a82e9c0 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToMolarityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,90 +31,57 @@ public static class NumberToMolarityExtensions { /// public static Molarity CentimolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromCentimolesPerLiter(Convert.ToDouble(value)); /// public static Molarity DecimolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromDecimolesPerLiter(Convert.ToDouble(value)); /// public static Molarity FemtomolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromFemtomolesPerLiter(Convert.ToDouble(value)); /// public static Molarity KilomolesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromKilomolesPerCubicMeter(Convert.ToDouble(value)); /// public static Molarity MicromolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromMicromolesPerLiter(Convert.ToDouble(value)); /// public static Molarity MillimolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromMillimolesPerLiter(Convert.ToDouble(value)); /// public static Molarity MolesPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromMolesPerCubicMeter(Convert.ToDouble(value)); /// public static Molarity MolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromMolesPerLiter(Convert.ToDouble(value)); /// public static Molarity NanomolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromNanomolesPerLiter(Convert.ToDouble(value)); /// public static Molarity PicomolesPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromPicomolesPerLiter(Convert.ToDouble(value)); /// public static Molarity PoundMolesPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Molarity.FromPoundMolesPerCubicFoot(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermeabilityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermeabilityExtensions.g.cs index c1c5f1b458..d7fa819e97 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermeabilityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermeabilityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToPermeabilityExtensions { /// public static Permeability HenriesPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Permeability.FromHenriesPerMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermittivityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermittivityExtensions.g.cs index 1c3b83a7b7..be6a340910 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermittivityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPermittivityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToPermittivityExtensions { /// public static Permittivity FaradsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Permittivity.FromFaradsPerMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPorousMediumPermeabilityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPorousMediumPermeabilityExtensions.g.cs index 9198d7c7c3..a6206ac71d 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPorousMediumPermeabilityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPorousMediumPermeabilityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,42 +31,27 @@ public static class NumberToPorousMediumPermeabilityExtensions { /// public static PorousMediumPermeability Darcys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PorousMediumPermeability.FromDarcys(Convert.ToDouble(value)); /// public static PorousMediumPermeability Microdarcys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PorousMediumPermeability.FromMicrodarcys(Convert.ToDouble(value)); /// public static PorousMediumPermeability Millidarcys(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PorousMediumPermeability.FromMillidarcys(Convert.ToDouble(value)); /// public static PorousMediumPermeability SquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PorousMediumPermeability.FromSquareCentimeters(Convert.ToDouble(value)); /// public static PorousMediumPermeability SquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PorousMediumPermeability.FromSquareMeters(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerDensityExtensions.g.cs index 847b8babbe..09d8267809 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerDensityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerDensityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,354 +31,222 @@ public static class NumberToPowerDensityExtensions { /// public static PowerDensity DecawattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDecawattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity DecawattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDecawattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity DecawattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDecawattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity DecawattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDecawattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity DeciwattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDeciwattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity DeciwattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDeciwattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity DeciwattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDeciwattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity DeciwattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromDeciwattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity GigawattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromGigawattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity GigawattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromGigawattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity GigawattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromGigawattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity GigawattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromGigawattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity KilowattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromKilowattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity KilowattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromKilowattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity KilowattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromKilowattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity KilowattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromKilowattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity MegawattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMegawattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity MegawattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMegawattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity MegawattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMegawattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity MegawattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMegawattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity MicrowattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMicrowattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity MicrowattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMicrowattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity MicrowattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMicrowattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity MicrowattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMicrowattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity MilliwattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMilliwattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity MilliwattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMilliwattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity MilliwattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMilliwattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity MilliwattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromMilliwattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity NanowattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromNanowattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity NanowattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromNanowattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity NanowattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromNanowattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity NanowattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromNanowattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity PicowattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromPicowattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity PicowattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromPicowattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity PicowattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromPicowattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity PicowattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromPicowattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity TerawattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromTerawattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity TerawattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromTerawattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity TerawattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromTerawattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity TerawattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromTerawattsPerLiter(Convert.ToDouble(value)); /// public static PowerDensity WattsPerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromWattsPerCubicFoot(Convert.ToDouble(value)); /// public static PowerDensity WattsPerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromWattsPerCubicInch(Convert.ToDouble(value)); /// public static PowerDensity WattsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromWattsPerCubicMeter(Convert.ToDouble(value)); /// public static PowerDensity WattsPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerDensity.FromWattsPerLiter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerExtensions.g.cs index 8889adcf42..9043a4cde3 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,210 +31,132 @@ public static class NumberToPowerExtensions { /// public static Power BoilerHorsepower(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromBoilerHorsepower(Convert.ToDouble(value)); /// public static Power BritishThermalUnitsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromBritishThermalUnitsPerHour(Convert.ToDouble(value)); /// public static Power Decawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromDecawatts(Convert.ToDouble(value)); /// public static Power Deciwatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromDeciwatts(Convert.ToDouble(value)); /// public static Power ElectricalHorsepower(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromElectricalHorsepower(Convert.ToDouble(value)); /// public static Power Femtowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromFemtowatts(Convert.ToDouble(value)); /// public static Power GigajoulesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromGigajoulesPerHour(Convert.ToDouble(value)); /// public static Power Gigawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromGigawatts(Convert.ToDouble(value)); /// public static Power HydraulicHorsepower(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromHydraulicHorsepower(Convert.ToDouble(value)); /// public static Power JoulesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromJoulesPerHour(Convert.ToDouble(value)); /// public static Power KilobritishThermalUnitsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromKilobritishThermalUnitsPerHour(Convert.ToDouble(value)); /// public static Power KilojoulesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromKilojoulesPerHour(Convert.ToDouble(value)); /// public static Power Kilowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromKilowatts(Convert.ToDouble(value)); /// public static Power MechanicalHorsepower(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMechanicalHorsepower(Convert.ToDouble(value)); /// public static Power MegabritishThermalUnitsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMegabritishThermalUnitsPerHour(Convert.ToDouble(value)); /// public static Power MegajoulesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMegajoulesPerHour(Convert.ToDouble(value)); /// public static Power Megawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMegawatts(Convert.ToDouble(value)); /// public static Power MetricHorsepower(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMetricHorsepower(Convert.ToDouble(value)); /// public static Power Microwatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMicrowatts(Convert.ToDouble(value)); /// public static Power MillijoulesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMillijoulesPerHour(Convert.ToDouble(value)); /// public static Power Milliwatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromMilliwatts(Convert.ToDouble(value)); /// public static Power Nanowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromNanowatts(Convert.ToDouble(value)); /// public static Power Petawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromPetawatts(Convert.ToDouble(value)); /// public static Power Picowatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromPicowatts(Convert.ToDouble(value)); /// public static Power Terawatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromTerawatts(Convert.ToDouble(value)); /// public static Power Watts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Power.FromWatts(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerRatioExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerRatioExtensions.g.cs index 19128fa14d..e2f708efff 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerRatioExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPowerRatioExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,18 +31,12 @@ public static class NumberToPowerRatioExtensions { /// public static PowerRatio DecibelMilliwatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerRatio.FromDecibelMilliwatts(Convert.ToDouble(value)); /// public static PowerRatio DecibelWatts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PowerRatio.FromDecibelWatts(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureChangeRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureChangeRateExtensions.g.cs index 3cc38f1321..84b89e356a 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureChangeRateExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureChangeRateExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,146 +31,92 @@ public static class NumberToPressureChangeRateExtensions { /// public static PressureChangeRate AtmospheresPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromAtmospheresPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate BarsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromBarsPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate BarsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromBarsPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate KilopascalsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromKilopascalsPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate KilopascalsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromKilopascalsPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate KilopoundsForcePerSquareInchPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromKilopoundsForcePerSquareInchPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate KilopoundsForcePerSquareInchPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromKilopoundsForcePerSquareInchPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate MegapascalsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromMegapascalsPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate MegapascalsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromMegapascalsPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate MegapoundsForcePerSquareInchPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromMegapoundsForcePerSquareInchPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate MegapoundsForcePerSquareInchPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromMegapoundsForcePerSquareInchPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate MillibarsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromMillibarsPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate MillibarsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromMillibarsPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate MillimetersOfMercuryPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromMillimetersOfMercuryPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate PascalsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromPascalsPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate PascalsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromPascalsPerSecond(Convert.ToDouble(value)); /// public static PressureChangeRate PoundsForcePerSquareInchPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromPoundsForcePerSquareInchPerMinute(Convert.ToDouble(value)); /// public static PressureChangeRate PoundsForcePerSquareInchPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => PressureChangeRate.FromPoundsForcePerSquareInchPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureExtensions.g.cs index 3f3ef204b5..26aa5c2747 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,394 +31,247 @@ public static class NumberToPressureExtensions { /// public static Pressure Atmospheres(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromAtmospheres(Convert.ToDouble(value)); /// public static Pressure Bars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromBars(Convert.ToDouble(value)); /// public static Pressure Centibars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromCentibars(Convert.ToDouble(value)); /// public static Pressure CentimetersOfWaterColumn(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromCentimetersOfWaterColumn(Convert.ToDouble(value)); /// public static Pressure Decapascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromDecapascals(Convert.ToDouble(value)); /// public static Pressure Decibars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromDecibars(Convert.ToDouble(value)); /// public static Pressure DynesPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromDynesPerSquareCentimeter(Convert.ToDouble(value)); /// public static Pressure FeetOfElevation(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromFeetOfElevation(Convert.ToDouble(value)); /// public static Pressure FeetOfHead(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromFeetOfHead(Convert.ToDouble(value)); /// public static Pressure Gigapascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromGigapascals(Convert.ToDouble(value)); /// public static Pressure Hectopascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromHectopascals(Convert.ToDouble(value)); /// public static Pressure InchesOfMercury(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromInchesOfMercury(Convert.ToDouble(value)); /// public static Pressure InchesOfWaterColumn(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromInchesOfWaterColumn(Convert.ToDouble(value)); /// public static Pressure Kilobars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilobars(Convert.ToDouble(value)); /// public static Pressure KilogramsForcePerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilogramsForcePerSquareCentimeter(Convert.ToDouble(value)); /// public static Pressure KilogramsForcePerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilogramsForcePerSquareMeter(Convert.ToDouble(value)); /// public static Pressure KilogramsForcePerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilogramsForcePerSquareMillimeter(Convert.ToDouble(value)); /// public static Pressure KilonewtonsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilonewtonsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Pressure KilonewtonsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilonewtonsPerSquareMeter(Convert.ToDouble(value)); /// public static Pressure KilonewtonsPerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilonewtonsPerSquareMillimeter(Convert.ToDouble(value)); /// public static Pressure Kilopascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilopascals(Convert.ToDouble(value)); /// public static Pressure KilopoundsForcePerSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilopoundsForcePerSquareFoot(Convert.ToDouble(value)); /// public static Pressure KilopoundsForcePerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilopoundsForcePerSquareInch(Convert.ToDouble(value)); /// public static Pressure KilopoundsForcePerSquareMil(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromKilopoundsForcePerSquareMil(Convert.ToDouble(value)); /// public static Pressure Megabars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMegabars(Convert.ToDouble(value)); /// public static Pressure MeganewtonsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMeganewtonsPerSquareMeter(Convert.ToDouble(value)); /// public static Pressure Megapascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMegapascals(Convert.ToDouble(value)); /// public static Pressure MetersOfElevation(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMetersOfElevation(Convert.ToDouble(value)); /// public static Pressure MetersOfHead(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMetersOfHead(Convert.ToDouble(value)); /// public static Pressure MetersOfWaterColumn(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMetersOfWaterColumn(Convert.ToDouble(value)); /// public static Pressure Microbars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMicrobars(Convert.ToDouble(value)); /// public static Pressure Micropascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMicropascals(Convert.ToDouble(value)); /// public static Pressure Millibars(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMillibars(Convert.ToDouble(value)); /// public static Pressure MillimetersOfMercury(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMillimetersOfMercury(Convert.ToDouble(value)); /// public static Pressure MillimetersOfWaterColumn(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMillimetersOfWaterColumn(Convert.ToDouble(value)); /// public static Pressure Millipascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromMillipascals(Convert.ToDouble(value)); /// public static Pressure NewtonsPerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromNewtonsPerSquareCentimeter(Convert.ToDouble(value)); /// public static Pressure NewtonsPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromNewtonsPerSquareMeter(Convert.ToDouble(value)); /// public static Pressure NewtonsPerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromNewtonsPerSquareMillimeter(Convert.ToDouble(value)); /// public static Pressure Pascals(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromPascals(Convert.ToDouble(value)); /// public static Pressure PoundsForcePerSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromPoundsForcePerSquareFoot(Convert.ToDouble(value)); /// public static Pressure PoundsForcePerSquareInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromPoundsForcePerSquareInch(Convert.ToDouble(value)); /// public static Pressure PoundsForcePerSquareMil(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromPoundsForcePerSquareMil(Convert.ToDouble(value)); /// public static Pressure PoundsPerInchSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromPoundsPerInchSecondSquared(Convert.ToDouble(value)); /// public static Pressure TechnicalAtmospheres(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromTechnicalAtmospheres(Convert.ToDouble(value)); /// public static Pressure TonnesForcePerSquareCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromTonnesForcePerSquareCentimeter(Convert.ToDouble(value)); /// public static Pressure TonnesForcePerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromTonnesForcePerSquareMeter(Convert.ToDouble(value)); /// public static Pressure TonnesForcePerSquareMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromTonnesForcePerSquareMillimeter(Convert.ToDouble(value)); /// public static Pressure Torrs(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Pressure.FromTorrs(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationExposureExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationExposureExtensions.g.cs index 643106c73b..9c14aa3eca 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationExposureExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationExposureExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,66 +31,42 @@ public static class NumberToRadiationExposureExtensions { /// public static RadiationExposure CoulombsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromCoulombsPerKilogram(Convert.ToDouble(value)); /// public static RadiationExposure MicrocoulombsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromMicrocoulombsPerKilogram(Convert.ToDouble(value)); /// public static RadiationExposure Microroentgens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromMicroroentgens(Convert.ToDouble(value)); /// public static RadiationExposure MillicoulombsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromMillicoulombsPerKilogram(Convert.ToDouble(value)); /// public static RadiationExposure Milliroentgens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromMilliroentgens(Convert.ToDouble(value)); /// public static RadiationExposure NanocoulombsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromNanocoulombsPerKilogram(Convert.ToDouble(value)); /// public static RadiationExposure PicocoulombsPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromPicocoulombsPerKilogram(Convert.ToDouble(value)); /// public static RadiationExposure Roentgens(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RadiationExposure.FromRoentgens(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadioactivityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadioactivityExtensions.g.cs index b9ecd03de3..c907150f3a 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadioactivityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadioactivityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,234 +31,147 @@ public static class NumberToRadioactivityExtensions { /// public static Radioactivity Becquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromBecquerels(Convert.ToDouble(value)); /// public static Radioactivity Curies(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromCuries(Convert.ToDouble(value)); /// public static Radioactivity Exabecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromExabecquerels(Convert.ToDouble(value)); /// public static Radioactivity Gigabecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromGigabecquerels(Convert.ToDouble(value)); /// public static Radioactivity Gigacuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromGigacuries(Convert.ToDouble(value)); /// public static Radioactivity Gigarutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromGigarutherfords(Convert.ToDouble(value)); /// public static Radioactivity Kilobecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromKilobecquerels(Convert.ToDouble(value)); /// public static Radioactivity Kilocuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromKilocuries(Convert.ToDouble(value)); /// public static Radioactivity Kilorutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromKilorutherfords(Convert.ToDouble(value)); /// public static Radioactivity Megabecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMegabecquerels(Convert.ToDouble(value)); /// public static Radioactivity Megacuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMegacuries(Convert.ToDouble(value)); /// public static Radioactivity Megarutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMegarutherfords(Convert.ToDouble(value)); /// public static Radioactivity Microbecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMicrobecquerels(Convert.ToDouble(value)); /// public static Radioactivity Microcuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMicrocuries(Convert.ToDouble(value)); /// public static Radioactivity Microrutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMicrorutherfords(Convert.ToDouble(value)); /// public static Radioactivity Millibecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMillibecquerels(Convert.ToDouble(value)); /// public static Radioactivity Millicuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMillicuries(Convert.ToDouble(value)); /// public static Radioactivity Millirutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromMillirutherfords(Convert.ToDouble(value)); /// public static Radioactivity Nanobecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromNanobecquerels(Convert.ToDouble(value)); /// public static Radioactivity Nanocuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromNanocuries(Convert.ToDouble(value)); /// public static Radioactivity Nanorutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromNanorutherfords(Convert.ToDouble(value)); /// public static Radioactivity Petabecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromPetabecquerels(Convert.ToDouble(value)); /// public static Radioactivity Picobecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromPicobecquerels(Convert.ToDouble(value)); /// public static Radioactivity Picocuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromPicocuries(Convert.ToDouble(value)); /// public static Radioactivity Picorutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromPicorutherfords(Convert.ToDouble(value)); /// public static Radioactivity Rutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromRutherfords(Convert.ToDouble(value)); /// public static Radioactivity Terabecquerels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromTerabecquerels(Convert.ToDouble(value)); /// public static Radioactivity Teracuries(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromTeracuries(Convert.ToDouble(value)); /// public static Radioactivity Terarutherfords(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Radioactivity.FromTerarutherfords(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioChangeRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioChangeRateExtensions.g.cs index 19bff685ff..21eef5a10f 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioChangeRateExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioChangeRateExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,18 +31,12 @@ public static class NumberToRatioChangeRateExtensions { /// public static RatioChangeRate DecimalFractionsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RatioChangeRate.FromDecimalFractionsPerSecond(Convert.ToDouble(value)); /// public static RatioChangeRate PercentsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RatioChangeRate.FromPercentsPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioExtensions.g.cs index 4e13937c48..13ec5c4027 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRatioExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToRatioExtensions { /// public static Ratio DecimalFractions(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Ratio.FromDecimalFractions(Convert.ToDouble(value)); /// public static Ratio PartsPerBillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Ratio.FromPartsPerBillion(Convert.ToDouble(value)); /// public static Ratio PartsPerMillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Ratio.FromPartsPerMillion(Convert.ToDouble(value)); /// public static Ratio PartsPerThousand(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Ratio.FromPartsPerThousand(Convert.ToDouble(value)); /// public static Ratio PartsPerTrillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Ratio.FromPartsPerTrillion(Convert.ToDouble(value)); /// public static Ratio Percent(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Ratio.FromPercent(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs index 57e2c4ee3f..ea684e8542 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToReactiveEnergyExtensions { /// public static ReactiveEnergy KilovoltampereReactiveHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReactiveEnergy.FromKilovoltampereReactiveHours(Convert.ToDouble(value)); /// public static ReactiveEnergy MegavoltampereReactiveHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReactiveEnergy.FromMegavoltampereReactiveHours(Convert.ToDouble(value)); /// public static ReactiveEnergy VoltampereReactiveHours(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReactiveEnergy.FromVoltampereReactiveHours(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs index 70ffc0b7b0..b2255302f4 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToReactivePowerExtensions { /// public static ReactivePower GigavoltamperesReactive(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReactivePower.FromGigavoltamperesReactive(Convert.ToDouble(value)); /// public static ReactivePower KilovoltamperesReactive(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReactivePower.FromKilovoltamperesReactive(Convert.ToDouble(value)); /// public static ReactivePower MegavoltamperesReactive(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReactivePower.FromMegavoltamperesReactive(Convert.ToDouble(value)); /// public static ReactivePower VoltamperesReactive(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReactivePower.FromVoltamperesReactive(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalAreaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalAreaExtensions.g.cs index 85b4bb1803..198990b1de 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalAreaExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalAreaExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,90 +31,57 @@ public static class NumberToReciprocalAreaExtensions { /// public static ReciprocalArea InverseSquareCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareCentimeters(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareDecimeters(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareFeet(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareInches(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareKilometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareKilometers(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareMeters(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareMicrometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareMicrometers(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareMiles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareMiles(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareMillimeters(Convert.ToDouble(value)); /// public static ReciprocalArea InverseSquareYards(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseSquareYards(Convert.ToDouble(value)); /// public static ReciprocalArea InverseUsSurveySquareFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalArea.FromInverseUsSurveySquareFeet(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalLengthExtensions.g.cs index 961f505c4c..e23c73b787 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReciprocalLengthExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,82 +31,52 @@ public static class NumberToReciprocalLengthExtensions { /// public static ReciprocalLength InverseCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseCentimeters(Convert.ToDouble(value)); /// public static ReciprocalLength InverseFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseFeet(Convert.ToDouble(value)); /// public static ReciprocalLength InverseInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseInches(Convert.ToDouble(value)); /// public static ReciprocalLength InverseMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseMeters(Convert.ToDouble(value)); /// public static ReciprocalLength InverseMicroinches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseMicroinches(Convert.ToDouble(value)); /// public static ReciprocalLength InverseMils(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseMils(Convert.ToDouble(value)); /// public static ReciprocalLength InverseMiles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseMiles(Convert.ToDouble(value)); /// public static ReciprocalLength InverseMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseMillimeters(Convert.ToDouble(value)); /// public static ReciprocalLength InverseUsSurveyFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseUsSurveyFeet(Convert.ToDouble(value)); /// public static ReciprocalLength InverseYards(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ReciprocalLength.FromInverseYards(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRelativeHumidityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRelativeHumidityExtensions.g.cs index a218c2130e..ccfde1d658 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRelativeHumidityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRelativeHumidityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToRelativeHumidityExtensions { /// public static RelativeHumidity Percent(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RelativeHumidity.FromPercent(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalAccelerationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalAccelerationExtensions.g.cs index 2fb64ce3fa..a85b5510ce 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalAccelerationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalAccelerationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToRotationalAccelerationExtensions { /// public static RotationalAcceleration DegreesPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalAcceleration.FromDegreesPerSecondSquared(Convert.ToDouble(value)); /// public static RotationalAcceleration RadiansPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalAcceleration.FromRadiansPerSecondSquared(Convert.ToDouble(value)); /// public static RotationalAcceleration RevolutionsPerMinutePerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalAcceleration.FromRevolutionsPerMinutePerSecond(Convert.ToDouble(value)); /// public static RotationalAcceleration RevolutionsPerSecondSquared(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalAcceleration.FromRevolutionsPerSecondSquared(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalSpeedExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalSpeedExtensions.g.cs index 2435e30aa9..353adf85f7 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalSpeedExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalSpeedExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,106 +31,67 @@ public static class NumberToRotationalSpeedExtensions { /// public static RotationalSpeed CentiradiansPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromCentiradiansPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed DeciradiansPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromDeciradiansPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed DegreesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromDegreesPerMinute(Convert.ToDouble(value)); /// public static RotationalSpeed DegreesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromDegreesPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed MicrodegreesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromMicrodegreesPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed MicroradiansPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromMicroradiansPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed MillidegreesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromMillidegreesPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed MilliradiansPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromMilliradiansPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed NanodegreesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromNanodegreesPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed NanoradiansPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromNanoradiansPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed RadiansPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromRadiansPerSecond(Convert.ToDouble(value)); /// public static RotationalSpeed RevolutionsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromRevolutionsPerMinute(Convert.ToDouble(value)); /// public static RotationalSpeed RevolutionsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalSpeed.FromRevolutionsPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs index fa713661cb..870ea78aaf 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,266 +31,167 @@ public static class NumberToRotationalStiffnessExtensions { /// public static RotationalStiffness CentinewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromCentinewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness CentinewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromCentinewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness CentinewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromCentinewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness DecanewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromDecanewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness DecanewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromDecanewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness DecanewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromDecanewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness DecinewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromDecinewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness DecinewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromDecinewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness DecinewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromDecinewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness KilonewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromKilonewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness KilonewtonMetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromKilonewtonMetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness KilonewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromKilonewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness KilonewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromKilonewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness KilopoundForceFeetPerDegrees(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromKilopoundForceFeetPerDegrees(Convert.ToDouble(value)); /// public static RotationalStiffness MeganewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMeganewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness MeganewtonMetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMeganewtonMetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness MeganewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMeganewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness MeganewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMeganewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness MicronewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMicronewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness MicronewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMicronewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness MicronewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMicronewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness MillinewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMillinewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness MillinewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMillinewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness MillinewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromMillinewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness NanonewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromNanonewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness NanonewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromNanonewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness NanonewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromNanonewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness NewtonMetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromNewtonMetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness NewtonMetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromNewtonMetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness NewtonMillimetersPerDegree(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromNewtonMillimetersPerDegree(Convert.ToDouble(value)); /// public static RotationalStiffness NewtonMillimetersPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromNewtonMillimetersPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness PoundForceFeetPerRadian(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromPoundForceFeetPerRadian(Convert.ToDouble(value)); /// public static RotationalStiffness PoundForceFeetPerDegrees(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffness.FromPoundForceFeetPerDegrees(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs index 61ca08cb9e..cdec8f8716 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRotationalStiffnessPerLengthExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,42 +31,27 @@ public static class NumberToRotationalStiffnessPerLengthExtensions { /// public static RotationalStiffnessPerLength KilonewtonMetersPerRadianPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffnessPerLength.FromKilonewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); /// public static RotationalStiffnessPerLength KilopoundForceFeetPerDegreesPerFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffnessPerLength.FromKilopoundForceFeetPerDegreesPerFeet(Convert.ToDouble(value)); /// public static RotationalStiffnessPerLength MeganewtonMetersPerRadianPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffnessPerLength.FromMeganewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); /// public static RotationalStiffnessPerLength NewtonMetersPerRadianPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); /// public static RotationalStiffnessPerLength PoundForceFeetPerDegreesPerFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => RotationalStiffnessPerLength.FromPoundForceFeetPerDegreesPerFeet(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToScalarExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToScalarExtensions.g.cs index 36ff683ac4..583c0bae23 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToScalarExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToScalarExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToScalarExtensions { /// public static Scalar Amount(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Scalar.FromAmount(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSolidAngleExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSolidAngleExtensions.g.cs index 769ebf0a67..f90376bd6d 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSolidAngleExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSolidAngleExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToSolidAngleExtensions { /// public static SolidAngle Steradians(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SolidAngle.FromSteradians(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEnergyExtensions.g.cs index f94c47ccc1..7ffb987e0e 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEnergyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEnergyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,242 +31,152 @@ public static class NumberToSpecificEnergyExtensions { /// public static SpecificEnergy BtuPerPound(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromBtuPerPound(Convert.ToDouble(value)); /// public static SpecificEnergy CaloriesPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromCaloriesPerGram(Convert.ToDouble(value)); /// public static SpecificEnergy GigawattDaysPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromGigawattDaysPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy GigawattDaysPerShortTon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromGigawattDaysPerShortTon(Convert.ToDouble(value)); /// public static SpecificEnergy GigawattDaysPerTonne(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromGigawattDaysPerTonne(Convert.ToDouble(value)); /// public static SpecificEnergy GigawattHoursPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromGigawattHoursPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy GigawattHoursPerPound(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromGigawattHoursPerPound(Convert.ToDouble(value)); /// public static SpecificEnergy JoulesPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromJoulesPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy KilocaloriesPerGram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromKilocaloriesPerGram(Convert.ToDouble(value)); /// public static SpecificEnergy KilojoulesPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromKilojoulesPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy KilowattDaysPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromKilowattDaysPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy KilowattDaysPerShortTon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromKilowattDaysPerShortTon(Convert.ToDouble(value)); /// public static SpecificEnergy KilowattDaysPerTonne(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromKilowattDaysPerTonne(Convert.ToDouble(value)); /// public static SpecificEnergy KilowattHoursPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromKilowattHoursPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy KilowattHoursPerPound(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromKilowattHoursPerPound(Convert.ToDouble(value)); /// public static SpecificEnergy MegajoulesPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromMegajoulesPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy MegaJoulesPerTonne(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromMegaJoulesPerTonne(Convert.ToDouble(value)); /// public static SpecificEnergy MegawattDaysPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromMegawattDaysPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy MegawattDaysPerShortTon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromMegawattDaysPerShortTon(Convert.ToDouble(value)); /// public static SpecificEnergy MegawattDaysPerTonne(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromMegawattDaysPerTonne(Convert.ToDouble(value)); /// public static SpecificEnergy MegawattHoursPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromMegawattHoursPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy MegawattHoursPerPound(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromMegawattHoursPerPound(Convert.ToDouble(value)); /// public static SpecificEnergy TerawattDaysPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromTerawattDaysPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy TerawattDaysPerShortTon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromTerawattDaysPerShortTon(Convert.ToDouble(value)); /// public static SpecificEnergy TerawattDaysPerTonne(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromTerawattDaysPerTonne(Convert.ToDouble(value)); /// public static SpecificEnergy WattDaysPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromWattDaysPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy WattDaysPerShortTon(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromWattDaysPerShortTon(Convert.ToDouble(value)); /// public static SpecificEnergy WattDaysPerTonne(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromWattDaysPerTonne(Convert.ToDouble(value)); /// public static SpecificEnergy WattHoursPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromWattHoursPerKilogram(Convert.ToDouble(value)); /// public static SpecificEnergy WattHoursPerPound(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEnergy.FromWattHoursPerPound(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEntropyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEntropyExtensions.g.cs index b84168a527..ac166335c5 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEntropyExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificEntropyExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToSpecificEntropyExtensions { /// public static SpecificEntropy BtusPerPoundFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromBtusPerPoundFahrenheit(Convert.ToDouble(value)); /// public static SpecificEntropy CaloriesPerGramKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromCaloriesPerGramKelvin(Convert.ToDouble(value)); /// public static SpecificEntropy JoulesPerKilogramDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromJoulesPerKilogramDegreeCelsius(Convert.ToDouble(value)); /// public static SpecificEntropy JoulesPerKilogramKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromJoulesPerKilogramKelvin(Convert.ToDouble(value)); /// public static SpecificEntropy KilocaloriesPerGramKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromKilocaloriesPerGramKelvin(Convert.ToDouble(value)); /// public static SpecificEntropy KilojoulesPerKilogramDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromKilojoulesPerKilogramDegreeCelsius(Convert.ToDouble(value)); /// public static SpecificEntropy KilojoulesPerKilogramKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromKilojoulesPerKilogramKelvin(Convert.ToDouble(value)); /// public static SpecificEntropy MegajoulesPerKilogramDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromMegajoulesPerKilogramDegreeCelsius(Convert.ToDouble(value)); /// public static SpecificEntropy MegajoulesPerKilogramKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificEntropy.FromMegajoulesPerKilogramKelvin(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificFuelConsumptionExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificFuelConsumptionExtensions.g.cs index 0d6dc5a674..e88b004e7a 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificFuelConsumptionExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificFuelConsumptionExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToSpecificFuelConsumptionExtensions { /// public static SpecificFuelConsumption GramsPerKiloNewtonSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificFuelConsumption.FromGramsPerKiloNewtonSecond(Convert.ToDouble(value)); /// public static SpecificFuelConsumption KilogramsPerKilogramForceHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificFuelConsumption.FromKilogramsPerKilogramForceHour(Convert.ToDouble(value)); /// public static SpecificFuelConsumption KilogramsPerKiloNewtonSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificFuelConsumption.FromKilogramsPerKiloNewtonSecond(Convert.ToDouble(value)); /// public static SpecificFuelConsumption PoundsMassPerPoundForceHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificFuelConsumption.FromPoundsMassPerPoundForceHour(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificVolumeExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificVolumeExtensions.g.cs index 786ff59b03..40370a1fca 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificVolumeExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificVolumeExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,26 +31,17 @@ public static class NumberToSpecificVolumeExtensions { /// public static SpecificVolume CubicFeetPerPound(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificVolume.FromCubicFeetPerPound(Convert.ToDouble(value)); /// public static SpecificVolume CubicMetersPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificVolume.FromCubicMetersPerKilogram(Convert.ToDouble(value)); /// public static SpecificVolume MillicubicMetersPerKilogram(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificVolume.FromMillicubicMetersPerKilogram(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificWeightExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificWeightExtensions.g.cs index 5a77413b77..19ed3e8699 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificWeightExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpecificWeightExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,138 +31,87 @@ public static class NumberToSpecificWeightExtensions { /// public static SpecificWeight KilogramsForcePerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilogramsForcePerCubicCentimeter(Convert.ToDouble(value)); /// public static SpecificWeight KilogramsForcePerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilogramsForcePerCubicMeter(Convert.ToDouble(value)); /// public static SpecificWeight KilogramsForcePerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilogramsForcePerCubicMillimeter(Convert.ToDouble(value)); /// public static SpecificWeight KilonewtonsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilonewtonsPerCubicCentimeter(Convert.ToDouble(value)); /// public static SpecificWeight KilonewtonsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilonewtonsPerCubicMeter(Convert.ToDouble(value)); /// public static SpecificWeight KilonewtonsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilonewtonsPerCubicMillimeter(Convert.ToDouble(value)); /// public static SpecificWeight KilopoundsForcePerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilopoundsForcePerCubicFoot(Convert.ToDouble(value)); /// public static SpecificWeight KilopoundsForcePerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromKilopoundsForcePerCubicInch(Convert.ToDouble(value)); /// public static SpecificWeight MeganewtonsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromMeganewtonsPerCubicMeter(Convert.ToDouble(value)); /// public static SpecificWeight NewtonsPerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromNewtonsPerCubicCentimeter(Convert.ToDouble(value)); /// public static SpecificWeight NewtonsPerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromNewtonsPerCubicMeter(Convert.ToDouble(value)); /// public static SpecificWeight NewtonsPerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromNewtonsPerCubicMillimeter(Convert.ToDouble(value)); /// public static SpecificWeight PoundsForcePerCubicFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromPoundsForcePerCubicFoot(Convert.ToDouble(value)); /// public static SpecificWeight PoundsForcePerCubicInch(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromPoundsForcePerCubicInch(Convert.ToDouble(value)); /// public static SpecificWeight TonnesForcePerCubicCentimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromTonnesForcePerCubicCentimeter(Convert.ToDouble(value)); /// public static SpecificWeight TonnesForcePerCubicMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromTonnesForcePerCubicMeter(Convert.ToDouble(value)); /// public static SpecificWeight TonnesForcePerCubicMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => SpecificWeight.FromTonnesForcePerCubicMillimeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpeedExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpeedExtensions.g.cs index eacd11c94f..9e17c99556 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpeedExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToSpeedExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,266 +31,167 @@ public static class NumberToSpeedExtensions { /// public static Speed CentimetersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromCentimetersPerHour(Convert.ToDouble(value)); /// public static Speed CentimetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromCentimetersPerMinute(Convert.ToDouble(value)); /// public static Speed CentimetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromCentimetersPerSecond(Convert.ToDouble(value)); /// public static Speed DecimetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromDecimetersPerMinute(Convert.ToDouble(value)); /// public static Speed DecimetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromDecimetersPerSecond(Convert.ToDouble(value)); /// public static Speed FeetPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromFeetPerHour(Convert.ToDouble(value)); /// public static Speed FeetPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromFeetPerMinute(Convert.ToDouble(value)); /// public static Speed FeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromFeetPerSecond(Convert.ToDouble(value)); /// public static Speed InchesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromInchesPerHour(Convert.ToDouble(value)); /// public static Speed InchesPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromInchesPerMinute(Convert.ToDouble(value)); /// public static Speed InchesPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromInchesPerSecond(Convert.ToDouble(value)); /// public static Speed KilometersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromKilometersPerHour(Convert.ToDouble(value)); /// public static Speed KilometersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromKilometersPerMinute(Convert.ToDouble(value)); /// public static Speed KilometersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromKilometersPerSecond(Convert.ToDouble(value)); /// public static Speed Knots(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromKnots(Convert.ToDouble(value)); /// public static Speed Mach(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMach(Convert.ToDouble(value)); /// public static Speed MetersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMetersPerHour(Convert.ToDouble(value)); /// public static Speed MetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMetersPerMinute(Convert.ToDouble(value)); /// public static Speed MetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMetersPerSecond(Convert.ToDouble(value)); /// public static Speed MicrometersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMicrometersPerMinute(Convert.ToDouble(value)); /// public static Speed MicrometersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMicrometersPerSecond(Convert.ToDouble(value)); /// public static Speed MilesPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMilesPerHour(Convert.ToDouble(value)); /// public static Speed MillimetersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMillimetersPerHour(Convert.ToDouble(value)); /// public static Speed MillimetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMillimetersPerMinute(Convert.ToDouble(value)); /// public static Speed MillimetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromMillimetersPerSecond(Convert.ToDouble(value)); /// public static Speed NanometersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromNanometersPerMinute(Convert.ToDouble(value)); /// public static Speed NanometersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromNanometersPerSecond(Convert.ToDouble(value)); /// public static Speed UsSurveyFeetPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromUsSurveyFeetPerHour(Convert.ToDouble(value)); /// public static Speed UsSurveyFeetPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromUsSurveyFeetPerMinute(Convert.ToDouble(value)); /// public static Speed UsSurveyFeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromUsSurveyFeetPerSecond(Convert.ToDouble(value)); /// public static Speed YardsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromYardsPerHour(Convert.ToDouble(value)); /// public static Speed YardsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromYardsPerMinute(Convert.ToDouble(value)); /// public static Speed YardsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Speed.FromYardsPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToStandardVolumeFlowExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToStandardVolumeFlowExtensions.g.cs index f16a65fe3b..b996f339cb 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToStandardVolumeFlowExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToStandardVolumeFlowExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToStandardVolumeFlowExtensions { /// public static StandardVolumeFlow StandardCubicCentimetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicCentimetersPerMinute(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardCubicFeetPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicFeetPerHour(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardCubicFeetPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicFeetPerMinute(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardCubicFeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicFeetPerSecond(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardCubicMetersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicMetersPerDay(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardCubicMetersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicMetersPerHour(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardCubicMetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicMetersPerMinute(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardCubicMetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardCubicMetersPerSecond(Convert.ToDouble(value)); /// public static StandardVolumeFlow StandardLitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => StandardVolumeFlow.FromStandardLitersPerMinute(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureChangeRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureChangeRateExtensions.g.cs index c54cba19b9..4bdd2577ce 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureChangeRateExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureChangeRateExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,82 +31,52 @@ public static class NumberToTemperatureChangeRateExtensions { /// public static TemperatureChangeRate CentidegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromCentidegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate DecadegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromDecadegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate DecidegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromDecidegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate DegreesCelsiusPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromDegreesCelsiusPerMinute(Convert.ToDouble(value)); /// public static TemperatureChangeRate DegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromDegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate HectodegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromHectodegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate KilodegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromKilodegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate MicrodegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromMicrodegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate MillidegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromMillidegreesCelsiusPerSecond(Convert.ToDouble(value)); /// public static TemperatureChangeRate NanodegreesCelsiusPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureChangeRate.FromNanodegreesCelsiusPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureDeltaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureDeltaExtensions.g.cs index 1411f8e573..c63d84dec8 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureDeltaExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureDeltaExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToTemperatureDeltaExtensions { /// public static TemperatureDelta DegreesCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromDegreesCelsius(Convert.ToDouble(value)); /// public static TemperatureDelta DegreesDelisle(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromDegreesDelisle(Convert.ToDouble(value)); /// public static TemperatureDelta DegreesFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromDegreesFahrenheit(Convert.ToDouble(value)); /// public static TemperatureDelta DegreesNewton(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromDegreesNewton(Convert.ToDouble(value)); /// public static TemperatureDelta DegreesRankine(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromDegreesRankine(Convert.ToDouble(value)); /// public static TemperatureDelta DegreesReaumur(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromDegreesReaumur(Convert.ToDouble(value)); /// public static TemperatureDelta DegreesRoemer(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromDegreesRoemer(Convert.ToDouble(value)); /// public static TemperatureDelta Kelvins(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromKelvins(Convert.ToDouble(value)); /// public static TemperatureDelta MillidegreesCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureDelta.FromMillidegreesCelsius(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureExtensions.g.cs index c49aa4c8a2..d45bed3def 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,82 +31,52 @@ public static class NumberToTemperatureExtensions { /// public static Temperature DegreesCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromDegreesCelsius(Convert.ToDouble(value)); /// public static Temperature DegreesDelisle(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromDegreesDelisle(Convert.ToDouble(value)); /// public static Temperature DegreesFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromDegreesFahrenheit(Convert.ToDouble(value)); /// public static Temperature DegreesNewton(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromDegreesNewton(Convert.ToDouble(value)); /// public static Temperature DegreesRankine(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromDegreesRankine(Convert.ToDouble(value)); /// public static Temperature DegreesReaumur(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromDegreesReaumur(Convert.ToDouble(value)); /// public static Temperature DegreesRoemer(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromDegreesRoemer(Convert.ToDouble(value)); /// public static Temperature Kelvins(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromKelvins(Convert.ToDouble(value)); /// public static Temperature MillidegreesCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromMillidegreesCelsius(Convert.ToDouble(value)); /// public static Temperature SolarTemperatures(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Temperature.FromSolarTemperatures(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureGradientExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureGradientExtensions.g.cs index 72f787a472..030b09db23 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureGradientExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTemperatureGradientExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,34 +31,22 @@ public static class NumberToTemperatureGradientExtensions { /// public static TemperatureGradient DegreesCelsiusPerKilometer(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureGradient.FromDegreesCelsiusPerKilometer(Convert.ToDouble(value)); /// public static TemperatureGradient DegreesCelsiusPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureGradient.FromDegreesCelsiusPerMeter(Convert.ToDouble(value)); /// public static TemperatureGradient DegreesFahrenheitPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureGradient.FromDegreesFahrenheitPerFoot(Convert.ToDouble(value)); /// public static TemperatureGradient KelvinsPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TemperatureGradient.FromKelvinsPerMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalConductivityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalConductivityExtensions.g.cs index 1342e6ed08..5ab075d3dc 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalConductivityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalConductivityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,18 +31,12 @@ public static class NumberToThermalConductivityExtensions { /// public static ThermalConductivity BtusPerHourFootFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalConductivity.FromBtusPerHourFootFahrenheit(Convert.ToDouble(value)); /// public static ThermalConductivity WattsPerMeterKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalConductivity.FromWattsPerMeterKelvin(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalResistanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalResistanceExtensions.g.cs index c2750af1da..e3a28b64e9 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalResistanceExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToThermalResistanceExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToThermalResistanceExtensions { /// public static ThermalResistance HourSquareFeetDegreesFahrenheitPerBtu(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalResistance.FromHourSquareFeetDegreesFahrenheitPerBtu(Convert.ToDouble(value)); /// public static ThermalResistance SquareCentimeterHourDegreesCelsiusPerKilocalorie(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalResistance.FromSquareCentimeterHourDegreesCelsiusPerKilocalorie(Convert.ToDouble(value)); /// public static ThermalResistance SquareCentimeterKelvinsPerWatt(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalResistance.FromSquareCentimeterKelvinsPerWatt(Convert.ToDouble(value)); /// public static ThermalResistance SquareMeterDegreesCelsiusPerWatt(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalResistance.FromSquareMeterDegreesCelsiusPerWatt(Convert.ToDouble(value)); /// public static ThermalResistance SquareMeterKelvinsPerKilowatt(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalResistance.FromSquareMeterKelvinsPerKilowatt(Convert.ToDouble(value)); /// public static ThermalResistance SquareMeterKelvinsPerWatt(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => ThermalResistance.FromSquareMeterKelvinsPerWatt(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorqueExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorqueExtensions.g.cs index b3cee45718..aaeb926815 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorqueExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorqueExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,202 +31,127 @@ public static class NumberToTorqueExtensions { /// public static Torque GramForceCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromGramForceCentimeters(Convert.ToDouble(value)); /// public static Torque GramForceMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromGramForceMeters(Convert.ToDouble(value)); /// public static Torque GramForceMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromGramForceMillimeters(Convert.ToDouble(value)); /// public static Torque KilogramForceCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilogramForceCentimeters(Convert.ToDouble(value)); /// public static Torque KilogramForceMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilogramForceMeters(Convert.ToDouble(value)); /// public static Torque KilogramForceMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilogramForceMillimeters(Convert.ToDouble(value)); /// public static Torque KilonewtonCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilonewtonCentimeters(Convert.ToDouble(value)); /// public static Torque KilonewtonMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilonewtonMeters(Convert.ToDouble(value)); /// public static Torque KilonewtonMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilonewtonMillimeters(Convert.ToDouble(value)); /// public static Torque KilopoundForceFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilopoundForceFeet(Convert.ToDouble(value)); /// public static Torque KilopoundForceInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromKilopoundForceInches(Convert.ToDouble(value)); /// public static Torque MeganewtonCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromMeganewtonCentimeters(Convert.ToDouble(value)); /// public static Torque MeganewtonMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromMeganewtonMeters(Convert.ToDouble(value)); /// public static Torque MeganewtonMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromMeganewtonMillimeters(Convert.ToDouble(value)); /// public static Torque MegapoundForceFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromMegapoundForceFeet(Convert.ToDouble(value)); /// public static Torque MegapoundForceInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromMegapoundForceInches(Convert.ToDouble(value)); /// public static Torque NewtonCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromNewtonCentimeters(Convert.ToDouble(value)); /// public static Torque NewtonMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromNewtonMeters(Convert.ToDouble(value)); /// public static Torque NewtonMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromNewtonMillimeters(Convert.ToDouble(value)); /// public static Torque PoundalFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromPoundalFeet(Convert.ToDouble(value)); /// public static Torque PoundForceFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromPoundForceFeet(Convert.ToDouble(value)); /// public static Torque PoundForceInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromPoundForceInches(Convert.ToDouble(value)); /// public static Torque TonneForceCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromTonneForceCentimeters(Convert.ToDouble(value)); /// public static Torque TonneForceMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromTonneForceMeters(Convert.ToDouble(value)); /// public static Torque TonneForceMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Torque.FromTonneForceMillimeters(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorquePerLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorquePerLengthExtensions.g.cs index c5d1cb1107..ed5edfd31c 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorquePerLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTorquePerLengthExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,170 +31,107 @@ public static class NumberToTorquePerLengthExtensions { /// public static TorquePerLength KilogramForceCentimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilogramForceCentimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength KilogramForceMetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilogramForceMetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength KilogramForceMillimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilogramForceMillimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength KilonewtonCentimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilonewtonCentimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength KilonewtonMetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilonewtonMetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength KilonewtonMillimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilonewtonMillimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength KilopoundForceFeetPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilopoundForceFeetPerFoot(Convert.ToDouble(value)); /// public static TorquePerLength KilopoundForceInchesPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromKilopoundForceInchesPerFoot(Convert.ToDouble(value)); /// public static TorquePerLength MeganewtonCentimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromMeganewtonCentimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength MeganewtonMetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromMeganewtonMetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength MeganewtonMillimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromMeganewtonMillimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength MegapoundForceFeetPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromMegapoundForceFeetPerFoot(Convert.ToDouble(value)); /// public static TorquePerLength MegapoundForceInchesPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromMegapoundForceInchesPerFoot(Convert.ToDouble(value)); /// public static TorquePerLength NewtonCentimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromNewtonCentimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength NewtonMetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromNewtonMetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength NewtonMillimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromNewtonMillimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength PoundForceFeetPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromPoundForceFeetPerFoot(Convert.ToDouble(value)); /// public static TorquePerLength PoundForceInchesPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromPoundForceInchesPerFoot(Convert.ToDouble(value)); /// public static TorquePerLength TonneForceCentimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromTonneForceCentimetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength TonneForceMetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromTonneForceMetersPerMeter(Convert.ToDouble(value)); /// public static TorquePerLength TonneForceMillimetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => TorquePerLength.FromTonneForceMillimetersPerMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTurbidityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTurbidityExtensions.g.cs index a5f16f99cc..e4c656b15c 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToTurbidityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToTurbidityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToTurbidityExtensions { /// public static Turbidity NTU(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Turbidity.FromNTU(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVitaminAExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVitaminAExtensions.g.cs index ff518abba9..b37184acbf 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVitaminAExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVitaminAExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,10 +31,7 @@ public static class NumberToVitaminAExtensions { /// public static VitaminA InternationalUnits(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VitaminA.FromInternationalUnits(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeConcentrationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeConcentrationExtensions.g.cs index d3faaab660..9f6b100368 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeConcentrationExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeConcentrationExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,162 +31,102 @@ public static class NumberToVolumeConcentrationExtensions { /// public static VolumeConcentration CentilitersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromCentilitersPerLiter(Convert.ToDouble(value)); /// public static VolumeConcentration CentilitersPerMililiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromCentilitersPerMililiter(Convert.ToDouble(value)); /// public static VolumeConcentration DecilitersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromDecilitersPerLiter(Convert.ToDouble(value)); /// public static VolumeConcentration DecilitersPerMililiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromDecilitersPerMililiter(Convert.ToDouble(value)); /// public static VolumeConcentration DecimalFractions(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromDecimalFractions(Convert.ToDouble(value)); /// public static VolumeConcentration LitersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromLitersPerLiter(Convert.ToDouble(value)); /// public static VolumeConcentration LitersPerMililiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromLitersPerMililiter(Convert.ToDouble(value)); /// public static VolumeConcentration MicrolitersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromMicrolitersPerLiter(Convert.ToDouble(value)); /// public static VolumeConcentration MicrolitersPerMililiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromMicrolitersPerMililiter(Convert.ToDouble(value)); /// public static VolumeConcentration MillilitersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromMillilitersPerLiter(Convert.ToDouble(value)); /// public static VolumeConcentration MillilitersPerMililiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromMillilitersPerMililiter(Convert.ToDouble(value)); /// public static VolumeConcentration NanolitersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromNanolitersPerLiter(Convert.ToDouble(value)); /// public static VolumeConcentration NanolitersPerMililiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromNanolitersPerMililiter(Convert.ToDouble(value)); /// public static VolumeConcentration PartsPerBillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromPartsPerBillion(Convert.ToDouble(value)); /// public static VolumeConcentration PartsPerMillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromPartsPerMillion(Convert.ToDouble(value)); /// public static VolumeConcentration PartsPerThousand(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromPartsPerThousand(Convert.ToDouble(value)); /// public static VolumeConcentration PartsPerTrillion(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromPartsPerTrillion(Convert.ToDouble(value)); /// public static VolumeConcentration Percent(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromPercent(Convert.ToDouble(value)); /// public static VolumeConcentration PicolitersPerLiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromPicolitersPerLiter(Convert.ToDouble(value)); /// public static VolumeConcentration PicolitersPerMililiter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeConcentration.FromPicolitersPerMililiter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeExtensions.g.cs index c979f5644b..c59e99291d 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,434 +31,272 @@ public static class NumberToVolumeExtensions { /// public static Volume AcreFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromAcreFeet(Convert.ToDouble(value)); /// public static Volume AuTablespoons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromAuTablespoons(Convert.ToDouble(value)); /// public static Volume BoardFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromBoardFeet(Convert.ToDouble(value)); /// public static Volume Centiliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCentiliters(Convert.ToDouble(value)); /// public static Volume CubicCentimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicCentimeters(Convert.ToDouble(value)); /// public static Volume CubicDecimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicDecimeters(Convert.ToDouble(value)); /// public static Volume CubicFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicFeet(Convert.ToDouble(value)); /// public static Volume CubicHectometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicHectometers(Convert.ToDouble(value)); /// public static Volume CubicInches(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicInches(Convert.ToDouble(value)); /// public static Volume CubicKilometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicKilometers(Convert.ToDouble(value)); /// public static Volume CubicMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicMeters(Convert.ToDouble(value)); /// public static Volume CubicMicrometers(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicMicrometers(Convert.ToDouble(value)); /// public static Volume CubicMiles(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicMiles(Convert.ToDouble(value)); /// public static Volume CubicMillimeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicMillimeters(Convert.ToDouble(value)); /// public static Volume CubicYards(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromCubicYards(Convert.ToDouble(value)); /// public static Volume Decaliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromDecaliters(Convert.ToDouble(value)); /// public static Volume DecausGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromDecausGallons(Convert.ToDouble(value)); /// public static Volume Deciliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromDeciliters(Convert.ToDouble(value)); /// public static Volume DeciusGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromDeciusGallons(Convert.ToDouble(value)); /// public static Volume HectocubicFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromHectocubicFeet(Convert.ToDouble(value)); /// public static Volume HectocubicMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromHectocubicMeters(Convert.ToDouble(value)); /// public static Volume Hectoliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromHectoliters(Convert.ToDouble(value)); /// public static Volume HectousGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromHectousGallons(Convert.ToDouble(value)); /// public static Volume ImperialBeerBarrels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromImperialBeerBarrels(Convert.ToDouble(value)); /// public static Volume ImperialGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromImperialGallons(Convert.ToDouble(value)); /// public static Volume ImperialOunces(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromImperialOunces(Convert.ToDouble(value)); /// public static Volume ImperialPints(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromImperialPints(Convert.ToDouble(value)); /// public static Volume ImperialQuarts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromImperialQuarts(Convert.ToDouble(value)); /// public static Volume KilocubicFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromKilocubicFeet(Convert.ToDouble(value)); /// public static Volume KilocubicMeters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromKilocubicMeters(Convert.ToDouble(value)); /// public static Volume KiloimperialGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromKiloimperialGallons(Convert.ToDouble(value)); /// public static Volume Kiloliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromKiloliters(Convert.ToDouble(value)); /// public static Volume KilousGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromKilousGallons(Convert.ToDouble(value)); /// public static Volume Liters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromLiters(Convert.ToDouble(value)); /// public static Volume MegacubicFeet(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMegacubicFeet(Convert.ToDouble(value)); /// public static Volume MegaimperialGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMegaimperialGallons(Convert.ToDouble(value)); /// public static Volume Megaliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMegaliters(Convert.ToDouble(value)); /// public static Volume MegausGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMegausGallons(Convert.ToDouble(value)); /// public static Volume MetricCups(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMetricCups(Convert.ToDouble(value)); /// public static Volume MetricTeaspoons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMetricTeaspoons(Convert.ToDouble(value)); /// public static Volume Microliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMicroliters(Convert.ToDouble(value)); /// public static Volume Milliliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromMilliliters(Convert.ToDouble(value)); /// public static Volume Nanoliters(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromNanoliters(Convert.ToDouble(value)); /// public static Volume OilBarrels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromOilBarrels(Convert.ToDouble(value)); /// public static Volume UkTablespoons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUkTablespoons(Convert.ToDouble(value)); /// public static Volume UsBeerBarrels(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsBeerBarrels(Convert.ToDouble(value)); /// public static Volume UsCustomaryCups(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsCustomaryCups(Convert.ToDouble(value)); /// public static Volume UsGallons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsGallons(Convert.ToDouble(value)); /// public static Volume UsLegalCups(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsLegalCups(Convert.ToDouble(value)); /// public static Volume UsOunces(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsOunces(Convert.ToDouble(value)); /// public static Volume UsPints(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsPints(Convert.ToDouble(value)); /// public static Volume UsQuarts(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsQuarts(Convert.ToDouble(value)); /// public static Volume UsTablespoons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsTablespoons(Convert.ToDouble(value)); /// public static Volume UsTeaspoons(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => Volume.FromUsTeaspoons(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowExtensions.g.cs index 0640c22d9f..76a767c614 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,538 +31,337 @@ public static class NumberToVolumeFlowExtensions { /// public static VolumeFlow AcreFeetPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromAcreFeetPerDay(Convert.ToDouble(value)); /// public static VolumeFlow AcreFeetPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromAcreFeetPerHour(Convert.ToDouble(value)); /// public static VolumeFlow AcreFeetPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromAcreFeetPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow AcreFeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromAcreFeetPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow CentilitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCentilitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow CentilitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCentilitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow CentilitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCentilitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow CentilitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCentilitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow CubicCentimetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicCentimetersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow CubicDecimetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicDecimetersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow CubicFeetPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicFeetPerHour(Convert.ToDouble(value)); /// public static VolumeFlow CubicFeetPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicFeetPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow CubicFeetPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicFeetPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow CubicMetersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicMetersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow CubicMetersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicMetersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow CubicMetersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicMetersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow CubicMetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicMetersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow CubicMillimetersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicMillimetersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow CubicYardsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicYardsPerDay(Convert.ToDouble(value)); /// public static VolumeFlow CubicYardsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicYardsPerHour(Convert.ToDouble(value)); /// public static VolumeFlow CubicYardsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicYardsPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow CubicYardsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromCubicYardsPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow DecilitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromDecilitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow DecilitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromDecilitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow DecilitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromDecilitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow DecilitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromDecilitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow KilolitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromKilolitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow KilolitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromKilolitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow KilolitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromKilolitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow KilolitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromKilolitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow KilousGallonsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromKilousGallonsPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow LitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromLitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow LitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromLitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow LitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromLitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow LitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromLitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow MegalitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMegalitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow MegalitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMegalitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow MegalitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMegalitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow MegalitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMegalitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow MegaukGallonsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMegaukGallonsPerDay(Convert.ToDouble(value)); /// public static VolumeFlow MegaukGallonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMegaukGallonsPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow MegausGallonsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMegausGallonsPerDay(Convert.ToDouble(value)); /// public static VolumeFlow MicrolitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMicrolitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow MicrolitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMicrolitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow MicrolitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMicrolitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow MicrolitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMicrolitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow MillilitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMillilitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow MillilitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMillilitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow MillilitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMillilitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow MillilitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMillilitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow MillionUsGallonsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromMillionUsGallonsPerDay(Convert.ToDouble(value)); /// public static VolumeFlow NanolitersPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromNanolitersPerDay(Convert.ToDouble(value)); /// public static VolumeFlow NanolitersPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromNanolitersPerHour(Convert.ToDouble(value)); /// public static VolumeFlow NanolitersPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromNanolitersPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow NanolitersPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromNanolitersPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow OilBarrelsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromOilBarrelsPerDay(Convert.ToDouble(value)); /// public static VolumeFlow OilBarrelsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromOilBarrelsPerHour(Convert.ToDouble(value)); /// public static VolumeFlow OilBarrelsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromOilBarrelsPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow OilBarrelsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromOilBarrelsPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow UkGallonsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUkGallonsPerDay(Convert.ToDouble(value)); /// public static VolumeFlow UkGallonsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUkGallonsPerHour(Convert.ToDouble(value)); /// public static VolumeFlow UkGallonsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUkGallonsPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow UkGallonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUkGallonsPerSecond(Convert.ToDouble(value)); /// public static VolumeFlow UsGallonsPerDay(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUsGallonsPerDay(Convert.ToDouble(value)); /// public static VolumeFlow UsGallonsPerHour(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUsGallonsPerHour(Convert.ToDouble(value)); /// public static VolumeFlow UsGallonsPerMinute(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUsGallonsPerMinute(Convert.ToDouble(value)); /// public static VolumeFlow UsGallonsPerSecond(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlow.FromUsGallonsPerSecond(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowPerAreaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowPerAreaExtensions.g.cs index a51f32978a..2f57713633 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowPerAreaExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumeFlowPerAreaExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,18 +31,12 @@ public static class NumberToVolumeFlowPerAreaExtensions { /// public static VolumeFlowPerArea CubicFeetPerMinutePerSquareFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlowPerArea.FromCubicFeetPerMinutePerSquareFoot(Convert.ToDouble(value)); /// public static VolumeFlowPerArea CubicMetersPerSecondPerSquareMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumeFlowPerArea.FromCubicMetersPerSecondPerSquareMeter(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumePerLengthExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumePerLengthExtensions.g.cs index c464b0668a..3ee5344715 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumePerLengthExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumePerLengthExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToVolumePerLengthExtensions { /// public static VolumePerLength CubicMetersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromCubicMetersPerMeter(Convert.ToDouble(value)); /// public static VolumePerLength CubicYardsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromCubicYardsPerFoot(Convert.ToDouble(value)); /// public static VolumePerLength CubicYardsPerUsSurveyFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromCubicYardsPerUsSurveyFoot(Convert.ToDouble(value)); /// public static VolumePerLength ImperialGallonsPerMile(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromImperialGallonsPerMile(Convert.ToDouble(value)); /// public static VolumePerLength LitersPerKilometer(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromLitersPerKilometer(Convert.ToDouble(value)); /// public static VolumePerLength LitersPerMeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromLitersPerMeter(Convert.ToDouble(value)); /// public static VolumePerLength LitersPerMillimeter(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromLitersPerMillimeter(Convert.ToDouble(value)); /// public static VolumePerLength OilBarrelsPerFoot(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromOilBarrelsPerFoot(Convert.ToDouble(value)); /// public static VolumePerLength UsGallonsPerMile(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumePerLength.FromUsGallonsPerMile(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumetricHeatCapacityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumetricHeatCapacityExtensions.g.cs index 14f3017903..c7365f002f 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumetricHeatCapacityExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToVolumetricHeatCapacityExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,74 +31,47 @@ public static class NumberToVolumetricHeatCapacityExtensions { /// public static VolumetricHeatCapacity BtusPerCubicFootDegreeFahrenheit(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromBtusPerCubicFootDegreeFahrenheit(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity CaloriesPerCubicCentimeterDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromCaloriesPerCubicCentimeterDegreeCelsius(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity JoulesPerCubicMeterDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromJoulesPerCubicMeterDegreeCelsius(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity JoulesPerCubicMeterKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromJoulesPerCubicMeterKelvin(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity KilocaloriesPerCubicCentimeterDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromKilocaloriesPerCubicCentimeterDegreeCelsius(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity KilojoulesPerCubicMeterDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromKilojoulesPerCubicMeterDegreeCelsius(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity KilojoulesPerCubicMeterKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromKilojoulesPerCubicMeterKelvin(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity MegajoulesPerCubicMeterDegreeCelsius(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromMegajoulesPerCubicMeterDegreeCelsius(Convert.ToDouble(value)); /// public static VolumetricHeatCapacity MegajoulesPerCubicMeterKelvin(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => VolumetricHeatCapacity.FromMegajoulesPerCubicMeterKelvin(Convert.ToDouble(value)); } diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToWarpingMomentOfInertiaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToWarpingMomentOfInertiaExtensions.g.cs index 7979daed07..9da36a0b5a 100644 --- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToWarpingMomentOfInertiaExtensions.g.cs +++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToWarpingMomentOfInertiaExtensions.g.cs @@ -18,10 +18,7 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; - -#if NET7_0_OR_GREATER using System.Numerics; -#endif #nullable enable @@ -34,50 +31,32 @@ public static class NumberToWarpingMomentOfInertiaExtensions { /// public static WarpingMomentOfInertia CentimetersToTheSixth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => WarpingMomentOfInertia.FromCentimetersToTheSixth(Convert.ToDouble(value)); /// public static WarpingMomentOfInertia DecimetersToTheSixth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => WarpingMomentOfInertia.FromDecimetersToTheSixth(Convert.ToDouble(value)); /// public static WarpingMomentOfInertia FeetToTheSixth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => WarpingMomentOfInertia.FromFeetToTheSixth(Convert.ToDouble(value)); /// public static WarpingMomentOfInertia InchesToTheSixth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => WarpingMomentOfInertia.FromInchesToTheSixth(Convert.ToDouble(value)); /// public static WarpingMomentOfInertia MetersToTheSixth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => WarpingMomentOfInertia.FromMetersToTheSixth(Convert.ToDouble(value)); /// public static WarpingMomentOfInertia MillimetersToTheSixth(this T value) - where T : notnull -#if NET7_0_OR_GREATER - , INumber -#endif + where T : notnull, INumber => WarpingMomentOfInertia.FromMillimetersToTheSixth(Convert.ToDouble(value)); } diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index 89724a7161..6a139a4ecf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,13 +39,11 @@ namespace UnitsNet [DataContract] public readonly partial struct Acceleration : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 58975e193f..85f6ac4906 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,13 +39,11 @@ namespace UnitsNet [DataContract] public readonly partial struct AmountOfSubstance : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IDivisionOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 4779c595ef..a88b7e1cba 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,11 +39,9 @@ namespace UnitsNet [DataContract] public readonly partial struct Angle : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 4dbb6648d8..dd6aa5c068 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Area : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IMultiplyOperators, @@ -56,7 +53,6 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index a75fc2a7c7..94f2796e29 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct AreaDensity : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index 840e9b6d03..61eb5476e0 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,10 +39,8 @@ namespace UnitsNet [DataContract] public readonly partial struct AreaMomentOfInertia : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index e79fe994e7..2e4c62010c 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,10 +39,8 @@ namespace UnitsNet [DataContract] public readonly partial struct BrakeSpecificFuelConsumption : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index 6985716cf0..75a761038d 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct CoefficientOfThermalExpansion : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 54634fe5d0..e0dab3a318 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,7 +42,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Density : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, @@ -53,7 +50,6 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 188f396f88..c7b08bab25 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Duration : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, @@ -56,7 +53,6 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index b38c05ab62..1eca45fe16 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,10 +42,8 @@ namespace UnitsNet [DataContract] public readonly partial struct DynamicViscosity : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index 5042285279..dc815907bf 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,11 +42,9 @@ namespace UnitsNet [DataContract] public readonly partial struct ElectricCharge : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index d0ea9143fa..928c7d8933 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,13 +39,11 @@ namespace UnitsNet [DataContract] public readonly partial struct ElectricCurrent : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index 9e4a93f316..6d313aebfb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct ElectricCurrentGradient : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index adbea34a4d..bb9cd99594 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,12 +39,10 @@ namespace UnitsNet [DataContract] public readonly partial struct ElectricPotential : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index e3e3b52d35..0b6c18c8f0 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct ElectricResistance : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index bf03909e6e..9f51cdf1cc 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Energy : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IDivisionOperators, @@ -53,7 +50,6 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index d11aeb52bb..a1e115a725 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct EnergyDensity : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 44ae5ecd7a..c28e5180ee 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,11 +39,9 @@ namespace UnitsNet [DataContract] public readonly partial struct Entropy : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index a1274c9d42..c6cf67f025 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Force : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IDivisionOperators, @@ -54,7 +51,6 @@ namespace UnitsNet IMultiplyOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index 8593920393..ac1bca1adb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct ForceChangeRate : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index b33a84b513..b688876904 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct ForcePerLength : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IDivisionOperators, @@ -51,7 +48,6 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index 4e19ecf2dc..f550906bad 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct Frequency : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 06470bb152..7a304ca100 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct HeatFlux : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index 657f51c33d..0b406a194c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct Jerk : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 19dc50df99..1950b32f80 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,12 +42,10 @@ namespace UnitsNet [DataContract] public readonly partial struct KinematicViscosity : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 6e4ae98f80..10fe75befb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Length : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IDivisionOperators, @@ -56,7 +53,6 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index 026370d388..ba880d8e14 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,11 +42,9 @@ namespace UnitsNet [DataContract] public readonly partial struct LinearDensity : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 80487fba93..f4e62ede62 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,9 +42,7 @@ namespace UnitsNet [DataContract] public readonly partial struct Luminance : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index 6b395a0909..8651f7f45d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,10 +42,8 @@ namespace UnitsNet [DataContract] public readonly partial struct LuminousIntensity : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index 6c8463810c..66632f1cdd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Mass : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IDivisionOperators, @@ -58,7 +55,6 @@ namespace UnitsNet IDivisionOperators, IMultiplyOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index b3bd701696..ecc6620f63 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,13 +42,11 @@ namespace UnitsNet [DataContract] public readonly partial struct MassConcentration : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IDivisionOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index 5c62f5b89c..609d3eb248 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct MassFlow : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IDivisionOperators, @@ -52,7 +49,6 @@ namespace UnitsNet IMultiplyOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 51e34f5505..8926e71610 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,11 +39,9 @@ namespace UnitsNet [DataContract] public readonly partial struct MassFlux : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index b7de21355e..4388daa390 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,9 +42,7 @@ namespace UnitsNet [DataContract] public readonly partial struct MassFraction : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index 0ee93f35f4..3a9d12c0c0 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,12 +39,10 @@ namespace UnitsNet [DataContract] public readonly partial struct MolarFlow : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index 37114c0762..5f11861c9b 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,11 +39,9 @@ namespace UnitsNet [DataContract] public readonly partial struct MolarMass : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index edc4201ad7..a3a4b425b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,13 +42,11 @@ namespace UnitsNet [DataContract] public readonly partial struct Molarity : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index 20edecda3d..a173687f3a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Power : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IDivisionOperators, @@ -56,7 +53,6 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 2b9b0ac0c2..e1853abdab 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Pressure : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, @@ -52,7 +49,6 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 79c0e35242..4628fdd074 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct PressureChangeRate : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index b796ef11fa..b304f3da78 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,10 +39,8 @@ namespace UnitsNet [DataContract] public readonly partial struct Ratio : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index 8bf4af8a24..2e059a80ff 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,12 +42,10 @@ namespace UnitsNet [DataContract] public readonly partial struct ReciprocalArea : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 8fa5f8bcd3..e580240cc7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,13 +42,11 @@ namespace UnitsNet [DataContract] public readonly partial struct ReciprocalLength : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index 2f917223fa..1d1ca5191e 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,10 +39,8 @@ namespace UnitsNet [DataContract] public readonly partial struct RotationalSpeed : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index 345fdc1b76..6a1717d383 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,11 +39,9 @@ namespace UnitsNet [DataContract] public readonly partial struct RotationalStiffness : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index 480b65d543..b3c37fc14a 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct RotationalStiffnessPerLength : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 90133848e1..52e2d9748c 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,14 +42,12 @@ namespace UnitsNet [DataContract] public readonly partial struct SpecificEnergy : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, IDivisionOperators, IDivisionOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index d3a1a0172a..815641b08b 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,10 +39,8 @@ namespace UnitsNet [DataContract] public readonly partial struct SpecificEntropy : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index c65602c990..293fa4fca2 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,10 +39,8 @@ namespace UnitsNet [DataContract] public readonly partial struct SpecificVolume : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index 63f0330845..ab273211c0 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,12 +42,10 @@ namespace UnitsNet [DataContract] public readonly partial struct SpecificWeight : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 9b5a9a80e6..6f1b59ad3c 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Speed : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IMultiplyOperators, @@ -50,7 +47,6 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index b801bea101..113f4693ac 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct TemperatureChangeRate : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index a3001d3e02..7abfaffe0c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct TemperatureDelta : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IDivisionOperators, @@ -49,7 +46,6 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index babb3f6f2c..03033bb925 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,9 +39,7 @@ namespace UnitsNet [DataContract] public readonly partial struct TemperatureGradient : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index 0f02672f0e..c79777ce9f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Torque : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, IDivisionOperators, @@ -49,7 +46,6 @@ namespace UnitsNet IDivisionOperators, IMultiplyOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index 880acbe456..190325a09d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,7 +39,6 @@ namespace UnitsNet [DataContract] public readonly partial struct Volume : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IDivisionOperators, IMultiplyOperators, @@ -53,7 +50,6 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IDivisionOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index ef6fb19a9a..76609ab1b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -44,10 +42,8 @@ namespace UnitsNet [DataContract] public readonly partial struct VolumeConcentration : IArithmeticQuantity, -#if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible, diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index 3c6413452c..303ddb299f 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -21,9 +21,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -#if NET7_0_OR_GREATER using System.Numerics; -#endif using System.Runtime.Serialization; using UnitsNet.InternalHelpers; using UnitsNet.Units; @@ -41,13 +39,11 @@ namespace UnitsNet [DataContract] public readonly partial struct VolumeFlow : IArithmeticQuantity, -#if NET7_0_OR_GREATER IDivisionOperators, IMultiplyOperators, IMultiplyOperators, IDivisionOperators, IMultiplyOperators, -#endif IComparable, IComparable, IConvertible,