diff --git a/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs b/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs
index 721c9a94ce..10aca1bc75 100644
--- a/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs
+++ b/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs
@@ -43,7 +43,7 @@ public struct {_quantity.Name}
///
/// The numeric value this quantity was constructed with.
///
- private readonly {_quantity.ValueType} _value;
+ private readonly double _value;
///
/// The unit this quantity was constructed with.
@@ -53,7 +53,7 @@ public struct {_quantity.Name}
///
/// The numeric value this quantity was constructed with.
///
- public {_quantity.ValueType} Value => _value;
+ public double Value => _value;
///
public {_unitEnumName} Unit => _unit;
@@ -66,7 +66,7 @@ public struct {_quantity.Name}
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
/// If value is NaN or Infinity.
- public {_quantity.Name}({_quantity.ValueType} value, {_unitEnumName} unit)
+ public {_quantity.Name}(double value, {_unitEnumName} unit)
{{
_value = value;
_unit = unit;
@@ -79,29 +79,14 @@ public struct {_quantity.Name}
///
/// Represents the largest possible value of {_quantity.Name}.
- /// ");
-
- // Non decimal
- Writer.WLCondition(_quantity.ValueType != "decimal", $@"
- public static {_quantity.Name} MaxValue {{ get; }} = new {_quantity.Name}({_quantity.ValueType}.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of {_quantity.Name}.
///
- public static {_quantity.Name} MinValue {{ get; }} = new {_quantity.Name}({_quantity.ValueType}.MinValue, BaseUnit);
-");
-
- // Decimal MaxValue = 79228162514264337593543950335M
- Writer.WLCondition(_quantity.ValueType == "decimal", $@"
- public static {_quantity.Name} MaxValue {{ get; }} = new {_quantity.Name}(79228162514264337593543950335M, BaseUnit);
+ public static {_quantity.Name} MaxValue {{ get; }} = new {_quantity.Name}(double.MaxValue, BaseUnit);
///
/// Represents the smallest possible value of {_quantity.Name}.
///
- public static {_quantity.Name} MinValue {{ get; }} = new {_quantity.Name}(-79228162514264337593543950335M, BaseUnit);
-");
+ public static {_quantity.Name} MinValue {{ get; }} = new {_quantity.Name}(double.MinValue, BaseUnit);
- Writer.WL($@"
///
/// Gets an instance of this quantity with a value of 0 in the base unit Second.
///
@@ -134,7 +119,7 @@ private void GenerateConversionProperties()
/// ");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public {_quantity.ValueType} {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
+ public double {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
");
}
@@ -161,7 +146,7 @@ private void GenerateStaticFactoryMethods()
/// If value is NaN or Infinity.");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public static {_quantity.Name} From{unit.PluralName}({_quantity.ValueType} {valueParamName}) => new {_quantity.Name}({valueParamName}, {_unitEnumName}.{unit.SingularName});
+ public static {_quantity.Name} From{unit.PluralName}(double {valueParamName}) => new {_quantity.Name}({valueParamName}, {_unitEnumName}.{unit.SingularName});
");
}
@@ -172,7 +157,7 @@ private void GenerateStaticFactoryMethods()
/// Value to convert from.
/// Unit to convert from.
/// {_quantity.Name} unit value.
- public static {_quantity.Name} From({_quantity.ValueType} value, {_unitEnumName} fromUnit)
+ public static {_quantity.Name} From(double value, {_unitEnumName} fromUnit)
{{
return new {_quantity.Name}(value, fromUnit);
}}
@@ -190,7 +175,7 @@ private void GenerateConversionMethods()
/// Convert to the unit representation .
///
/// Value converted to the specified unit.
- public {_quantity.ValueType} As({_unitEnumName} unit) => GetValueAs(unit);
+ public double As({_unitEnumName} unit) => GetValueAs(unit);
///
/// Converts this {_quantity.Name} to another {_quantity.Name} with the unit representation .
@@ -207,7 +192,7 @@ private void GenerateConversionMethods()
/// This is typically the first step in converting from one unit to another.
///
/// The value in the base unit representation.
- private {_quantity.ValueType} GetValueInBaseUnit()
+ private double GetValueInBaseUnit()
{{
return Unit switch
{{");
@@ -223,7 +208,7 @@ private void GenerateConversionMethods()
}};
}}
- private {_quantity.ValueType} GetValueAs({_unitEnumName} unit)
+ private double GetValueAs({_unitEnumName} unit)
{{
if (Unit == unit)
return _value;
diff --git a/CodeGen/Generators/NanoFrameworkGenerator.cs b/CodeGen/Generators/NanoFrameworkGenerator.cs
index 1753235749..19d8cab43c 100644
--- a/CodeGen/Generators/NanoFrameworkGenerator.cs
+++ b/CodeGen/Generators/NanoFrameworkGenerator.cs
@@ -90,20 +90,6 @@ public static void Generate(string rootDir, Quantity[] quantities, QuantityNameT
GenerateQuantity(quantity, Path.Combine(outputQuantities, $"{quantity.Name}.g.cs"));
GenerateProject(quantity, Path.Combine(projectPath, $"{quantity.Name}.nfproj"), versions);
- // Convert decimal based units to floats; decimals are not supported by nanoFramework
- if (quantity.ValueType == "decimal")
- {
- var replacements = new Dictionary
- {
- { "(\\d)m", "$1d" },
- { "(\\d)M", "$1d" },
- { " decimal ", " double " },
- { "(decimal ", "(double " }
- };
- new FileInfo(Path.Combine(outputDir, "Units", $"{quantity.Name}Unit.g.cs")).EditFile(replacements);
- new FileInfo(Path.Combine(outputDir, "Quantities", $"{quantity.Name}.g.cs")).EditFile(replacements);
- }
-
Log.Information("✅ {Quantity} (nanoFramework)", quantity.Name);
}
Log.Information("");
diff --git a/CodeGen/Generators/QuantityJsonFilesParser.cs b/CodeGen/Generators/QuantityJsonFilesParser.cs
index 316e785fd6..a9393e9efa 100644
--- a/CodeGen/Generators/QuantityJsonFilesParser.cs
+++ b/CodeGen/Generators/QuantityJsonFilesParser.cs
@@ -48,7 +48,6 @@ private static Quantity ParseQuantityFile(string jsonFileName)
?? throw new UnitsNetCodeGenException($"Unable to parse quantity from JSON file: {jsonFileName}");
AddPrefixUnits(quantity);
- FixConversionFunctionsForDecimalValueTypes(quantity);
OrderUnitsByName(quantity);
return quantity;
}
@@ -63,20 +62,6 @@ private static void OrderUnitsByName(Quantity quantity)
quantity.Units = quantity.Units.OrderBy(u => u.SingularName, StringComparer.OrdinalIgnoreCase).ToArray();
}
- private static void FixConversionFunctionsForDecimalValueTypes(Quantity quantity)
- {
- foreach (Unit u in quantity.Units)
- // Use decimal for internal calculations if base type is not double, such as for long or int.
- {
- if (string.Equals(quantity.ValueType, "decimal", StringComparison.OrdinalIgnoreCase))
- {
- // Change any double literals like "1024d" to decimal literals "1024m"
- u.FromUnitToBaseFunc = u.FromUnitToBaseFunc.Replace("d", "m");
- u.FromBaseToUnitFunc = u.FromBaseToUnitFunc.Replace("d", "m");
- }
- }
- }
-
private static void AddPrefixUnits(Quantity quantity)
{
var unitsToAdd = new List();
diff --git a/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs b/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
index 61749f5f08..0c5f762c04 100644
--- a/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
@@ -45,7 +45,7 @@ public static class NumberTo{_quantityName}Extensions
continue;
Writer.WL(2, $@"
-/// ");
+/// ");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit.ObsoleteText));
diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
index 86490605d1..e0d5f41066 100644
--- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
@@ -14,7 +14,6 @@ internal class QuantityGenerator : GeneratorBase
private readonly bool _isDimensionless;
private readonly string _unitEnumName;
- private readonly string _valueType;
private readonly Unit _baseUnit;
public QuantityGenerator(Quantity quantity)
@@ -25,7 +24,6 @@ public QuantityGenerator(Quantity quantity)
throw new ArgumentException($"No unit found with SingularName equal to BaseUnit [{_quantity.BaseUnit}]. This unit must be defined.",
nameof(quantity));
- _valueType = quantity.ValueType;
_unitEnumName = $"{quantity.Name}Unit";
BaseDimensions baseDimensions = quantity.BaseDimensions;
@@ -69,7 +67,7 @@ namespace UnitsNet
Writer.WL(@$"
[DataContract]
public readonly partial struct {_quantity.Name} :
- {(_quantity.GenerateArithmetic ? "IArithmeticQuantity" : "IQuantity")}<{_quantity.Name}, {_unitEnumName}, {_quantity.ValueType}>,");
+ {(_quantity.GenerateArithmetic ? "IArithmeticQuantity" : "IQuantity")}<{_quantity.Name}, {_unitEnumName}>,");
if (_quantity.Relations.Any(r => r.Operator is "*" or "/"))
{
@@ -100,9 +98,6 @@ namespace UnitsNet
#endif");
}
- if (_quantity.ValueType == "decimal") Writer.WL(@$"
- IDecimalQuantity,");
-
Writer.WL(@$"
IComparable,
IComparable<{_quantity.Name}>,
@@ -116,7 +111,7 @@ namespace UnitsNet
/// The numeric value this quantity was constructed with.
///
[DataMember(Name = ""Value"", Order = 1)]
- private readonly {_quantity.ValueType} _value;
+ private readonly double _value;
///
/// The unit this quantity was constructed with.
@@ -209,7 +204,7 @@ private void GenerateInstanceConstructors()
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
/// If value is NaN or Infinity.
- public {_quantity.Name}({_quantity.ValueType} value, {_unitEnumName} unit)
+ public {_quantity.Name}(double value, {_unitEnumName} unit)
{{");
Writer.WL(@"
_value = value;");
@@ -225,7 +220,7 @@ private void GenerateInstanceConstructors()
/// The unit system to create the quantity with.
/// The given is null.
/// No unit was found for the given .
- public {_quantity.Name}({_valueType} value, UnitSystem unitSystem)
+ public {_quantity.Name}(double value, UnitSystem unitSystem)
{{
if (unitSystem is null) throw new ArgumentNullException(nameof(unitSystem));
@@ -296,10 +291,10 @@ private void GenerateProperties()
///
/// The numeric value this quantity was constructed with.
///
- public {_valueType} Value => _value;
+ public double Value => _value;
///
- QuantityValue IQuantity.Value => _value;
+ double IQuantity.Value => _value;
Enum IQuantity.Unit => Unit;
@@ -332,11 +327,11 @@ private void GenerateConversionProperties()
Writer.WL($@"
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
/// ");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public {_quantity.ValueType} {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
+ public double {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
");
}
@@ -421,7 +416,6 @@ private void GenerateStaticFactoryMethods()
{
if (unit.SkipConversionGeneration) continue;
- var valueParamName = unit.PluralName.ToLowerInvariant();
Writer.WL($@"
///
/// Creates a from .
@@ -429,9 +423,8 @@ private void GenerateStaticFactoryMethods()
/// If value is NaN or Infinity.");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public static {_quantity.Name} From{unit.PluralName}(QuantityValue {valueParamName})
+ public static {_quantity.Name} From{unit.PluralName}(double value)
{{
- {_valueType} value = ({_valueType}) {valueParamName};
return new {_quantity.Name}(value, {_unitEnumName}.{unit.SingularName});
}}
");
@@ -444,9 +437,9 @@ private void GenerateStaticFactoryMethods()
/// Value to convert from.
/// Unit to convert from.
/// {_quantity.Name} unit value.
- public static {_quantity.Name} From(QuantityValue value, {_unitEnumName} fromUnit)
+ public static {_quantity.Name} From(double value, {_unitEnumName} fromUnit)
{{
- return new {_quantity.Name}(({_valueType})value, fromUnit);
+ return new {_quantity.Name}(value, fromUnit);
}}
#endregion
@@ -635,25 +628,25 @@ private void GenerateArithmeticOperators()
}}
/// Get from multiplying value and .
- public static {_quantity.Name} operator *({_valueType} left, {_quantity.Name} right)
+ public static {_quantity.Name} operator *(double left, {_quantity.Name} right)
{{
return new {_quantity.Name}(left * right.Value, right.Unit);
}}
/// Get from multiplying value and .
- public static {_quantity.Name} operator *({_quantity.Name} left, {_valueType} right)
+ public static {_quantity.Name} operator *({_quantity.Name} left, double right)
{{
return new {_quantity.Name}(left.Value * right, left.Unit);
}}
/// Get from dividing by value.
- public static {_quantity.Name} operator /({_quantity.Name} left, {_valueType} right)
+ public static {_quantity.Name} operator /({_quantity.Name} left, double right)
{{
return new {_quantity.Name}(left.Value / right, left.Unit);
}}
/// Get ratio value from dividing by .
- public static {_quantity.ValueType} operator /({_quantity.Name} left, {_quantity.Name} right)
+ public static double operator /({_quantity.Name} left, {_quantity.Name} right)
{{
return left.{_baseUnit.PluralName} / right.{_baseUnit.PluralName};
}}
@@ -693,7 +686,7 @@ private void GenerateLogarithmicArithmeticOperators()
}}
/// Get from logarithmic multiplication of value and .
- public static {_quantity.Name} operator *({_valueType} left, {_quantity.Name} right)
+ public static {_quantity.Name} operator *(double left, {_quantity.Name} right)
{{
// Logarithmic multiplication = addition
return new {_quantity.Name}(left + right.Value, right.Unit);
@@ -703,14 +696,14 @@ private void GenerateLogarithmicArithmeticOperators()
public static {_quantity.Name} operator *({_quantity.Name} left, double right)
{{
// Logarithmic multiplication = addition
- return new {_quantity.Name}(left.Value + ({_valueType})right, left.Unit);
+ return new {_quantity.Name}(left.Value + right, left.Unit);
}}
/// Get from logarithmic division of by value.
public static {_quantity.Name} operator /({_quantity.Name} left, double right)
{{
// Logarithmic division = subtraction
- return new {_quantity.Name}(left.Value - ({_valueType})right, left.Unit);
+ return new {_quantity.Name}(left.Value - right, left.Unit);
}}
/// Get ratio value from logarithmic division of by .
@@ -784,12 +777,9 @@ private void GenerateRelationalOperators()
rightParameter = rightPart = "value";
}
- var leftCast = relation.LeftQuantity.ValueType is "decimal" ? "(double)" : string.Empty;
- var rightCast = relation.RightQuantity.ValueType is "decimal" ? "(double)" : string.Empty;
-
- var expression = $"{leftCast}{leftPart} {relation.Operator} {rightCast}{rightPart}";
+ var expression = $"{leftPart} {relation.Operator} {rightPart}";
- if (relation.ResultQuantity.Name is not ("double" or "decimal"))
+ if (relation.ResultQuantity.Name is not "double")
{
expression = $"{relation.ResultQuantity.Name}.From{relation.ResultUnit.PluralName}({expression})";
}
@@ -947,7 +937,7 @@ public int CompareTo({_quantity.Name} other)
///
///
/// Note that it is advised against specifying zero difference, due to the nature
- /// of floating-point operations and using {_valueType} internally.
+ /// of floating-point operations and using double internally.
///
///
/// The other quantity to compare to.
@@ -955,7 +945,7 @@ public int CompareTo({_quantity.Name} other)
/// The comparison type: either relative or absolute.
/// True if the absolute difference between the two values is not greater than the specified relative or absolute tolerance.
[Obsolete(""Use Equals({_quantity.Name} other, {_quantity.Name} tolerance) instead, to check equality across units and to specify the max tolerance for rounding errors due to floating-point arithmetic when converting between units."")]
- public bool Equals({_quantity.Name} other, {_quantity.ValueType} tolerance, ComparisonType comparisonType)
+ public bool Equals({_quantity.Name} other, double tolerance, ComparisonType comparisonType)
{{
if (tolerance < 0)
throw new ArgumentOutOfRangeException(nameof(tolerance), ""Tolerance must be greater than or equal to 0."");
@@ -1009,7 +999,7 @@ private void GenerateConversionMethods()
/// Convert to the unit representation .
///
/// Value converted to the specified unit.
- public {_quantity.ValueType} As({_unitEnumName} unit)
+ public double As({_unitEnumName} unit)
{{
if (Unit == unit)
return Value;
@@ -1018,21 +1008,10 @@ private void GenerateConversionMethods()
}}
");
- if (_quantity.ValueType == "decimal")
- {
- Writer.WL($@"
-
- double IQuantity<{_unitEnumName}>.As({_unitEnumName} unit)
- {{
- return (double)As(unit);
- }}
-");
- }
-
Writer.WL($@"
///
- public {_quantity.ValueType} As(UnitSystem unitSystem)
+ public double As(UnitSystem unitSystem)
{{
if (unitSystem is null)
throw new ArgumentNullException(nameof(unitSystem));
@@ -1047,29 +1026,9 @@ private void GenerateConversionMethods()
}}
");
- if (_quantity.ValueType == "decimal")
- {
- Writer.WL($@"
- ///
- double IQuantity.As(UnitSystem unitSystem)
- {{
- return (double)As(unitSystem);
- }}
-");
- }
-
Writer.WL($@"
///
double IQuantity.As(Enum unit)
- {{
- if (!(unit is {_unitEnumName} typedUnit))
- throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
-
- return (double)As(typedUnit);
- }}
-
- ///
- {_quantity.ValueType} IValueQuantity<{_quantity.ValueType}>.As(Enum unit)
{{
if (!(unit is {_unitEnumName} typedUnit))
throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
@@ -1206,18 +1165,6 @@ IQuantity IQuantity.ToUnit(Enum unit)
///
IQuantity<{_unitEnumName}> IQuantity<{_unitEnumName}>.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
- ///
- IValueQuantity<{_quantity.ValueType}> IValueQuantity<{_quantity.ValueType}>.ToUnit(Enum unit)
- {{
- if (unit is not {_unitEnumName} typedUnit)
- throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
-
- return ToUnit(typedUnit);
- }}
-
- ///
- IValueQuantity<{_quantity.ValueType}> IValueQuantity<{_quantity.ValueType}>.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
-
#endregion
");
}
diff --git a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
index 502437b592..4dc356fd1e 100644
--- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
@@ -49,7 +49,7 @@ public partial class Quantity
/// The of the quantity to create.
/// The value to construct the quantity with.
/// The created quantity.
- public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValue value)
+ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, double value)
{
return quantityInfo.Name switch
{");
@@ -72,7 +72,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu
/// Unit enum value.
/// The resulting quantity if successful, otherwise default.
/// True if successful with assigned the value, otherwise false.
- public static bool TryFrom(QuantityValue value, Enum? unit, [NotNullWhen(true)] out IQuantity? quantity)
+ public static bool TryFrom(double value, Enum? unit, [NotNullWhen(true)] out IQuantity? quantity)
{
quantity = unit switch
{");
diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
index 1c39c9824f..6c0b3b9c2c 100644
--- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
@@ -40,11 +40,6 @@ internal class UnitTestBaseClassGenerator : GeneratorBase
///
private readonly string _baseUnitFullName;
- ///
- /// Constructors for decimal-backed quantities require decimal numbers as input, so add the "m" suffix to numbers when constructing those quantities.
- ///
- private readonly string _numberSuffix;
-
///
/// Other unit, if more than one unit exists for quantity, otherwise same as .
///
@@ -66,7 +61,6 @@ public UnitTestBaseClassGenerator(Quantity quantity)
_baseUnitEnglishAbbreviation = GetEnglishAbbreviation(_baseUnit);
_baseUnitFullName = $"{_unitEnumName}.{_baseUnit.SingularName}";
- _numberSuffix = quantity.ValueType == "decimal" ? "m" : "";
// Try to pick another unit, or fall back to base unit if only a single unit.
_otherOrBaseUnit = quantity.Units.Where(u => u != _baseUnit).DefaultIfEmpty(_baseUnit).First();
@@ -117,7 +111,7 @@ public abstract partial class {_quantity.Name}TestsBase : QuantityTestsBase
if (unit.SkipConversionGeneration) continue;
Writer.WL($@"
- protected abstract {_quantity.ValueType} {unit.PluralName}InOne{_baseUnit.SingularName} {{ get; }}");
+ protected abstract double {unit.PluralName}InOne{_baseUnit.SingularName} {{ get; }}");
}
Writer.WL();
@@ -128,12 +122,12 @@ public abstract partial class {_quantity.Name}TestsBase : QuantityTestsBase
if (unit.SkipConversionGeneration) continue;
Writer.WL($@"
- protected virtual {_quantity.ValueType} {unit.PluralName}Tolerance {{ get {{ return { (_quantity.ValueType == "decimal" ? "1e-9m" : "1e-5") }; }} }}");
+ protected virtual double {unit.PluralName}Tolerance {{ get {{ return 1e-5; }} }}");
}
Writer.WL($@"
// ReSharper restore VirtualMemberNeverOverriden.Global
- protected ({_quantity.ValueType} UnitsInBaseUnit, {_quantity.ValueType} Tolerence) GetConversionFactor({_unitEnumName} unit)
+ protected (double UnitsInBaseUnit, double Tolerence) GetConversionFactor({_unitEnumName} unit)
{{
return unit switch
{{");
@@ -162,14 +156,10 @@ public abstract partial class {_quantity.Name}TestsBase : QuantityTestsBase
public void DefaultCtor_ReturnsQuantityWithZeroValueAndBaseUnit()
{{
var quantity = new {_quantity.Name}();
- Assert.Equal(0, quantity.Value);");
- if (_quantity.ValueType == "decimal") Writer.WL(@"
- Assert.Equal(0m, ((IValueQuantity)quantity).Value);");
- Writer.WL($@"
+ Assert.Equal(0, quantity.Value);
Assert.Equal({_baseUnitFullName}, quantity.Unit);
}}
-");
- if (_quantity.ValueType == "double") Writer.WL($@"
+
[Fact]
public void Ctor_WithInfinityValue_DoNotThrowsArgumentException()
{{
@@ -187,7 +177,6 @@ public void Ctor_WithNaNValue_DoNotThrowsArgumentException()
Assert.Null(exception);
}}
-"); Writer.WL($@"
[Fact]
public void Ctor_NullAsUnitSystem_ThrowsArgumentNullException()
@@ -250,8 +239,7 @@ public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit()
}
Writer.WL($@"
}}
-");
- if (_quantity.ValueType == "double") Writer.WL($@"
+
[Fact]
public void From{_baseUnit.PluralName}_WithInfinityValue_DoNotThrowsArgumentException()
{{
@@ -269,7 +257,6 @@ public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit()
Assert.Null(exception);
}}
-"); Writer.WL($@"
[Fact]
public void As()
@@ -521,7 +508,7 @@ public void CompareToThrowsOnNull()
[InlineData(1, {_baseUnitFullName}, 1, {_otherOrBaseUnitFullName}, false)] // Different unit.");
}
Writer.WL($@"
- public void Equals_ReturnsTrue_IfValueAndUnitAreEqual({_quantity.ValueType} valueA, {_unitEnumName} unitA, {_quantity.ValueType} valueB, {_unitEnumName} unitB, bool expectEqual)
+ public void Equals_ReturnsTrue_IfValueAndUnitAreEqual(double valueA, {_unitEnumName} unitA, double valueB, {_unitEnumName} unitB, bool expectEqual)
{{
var a = new {_quantity.Name}(valueA, unitA);
var b = new {_quantity.Name}(valueB, unitB);
@@ -642,10 +629,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
try
{{
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
- Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s1""));
- Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s2""));
- Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s3""));
- Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s4""));
+ Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s1""));
+ Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s2""));
+ Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s3""));
+ Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s4""));
}}
finally
{{
@@ -657,10 +644,10 @@ public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCul
public void ToString_SFormatAndCulture_FormatsNumberWithGivenDigitsAfterRadixForGivenCulture()
{{
var culture = CultureInfo.InvariantCulture;
- Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s1"", culture));
- Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s2"", culture));
- Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s3"", culture));
- Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s4"", culture));
+ Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s1"", culture));
+ Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s2"", culture));
+ Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s3"", culture));
+ Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s4"", culture));
}}
[Theory]
diff --git a/CodeGen/JsonTypes/Quantity.cs b/CodeGen/JsonTypes/Quantity.cs
index 6956560161..35f81a3ee2 100644
--- a/CodeGen/JsonTypes/Quantity.cs
+++ b/CodeGen/JsonTypes/Quantity.cs
@@ -11,7 +11,6 @@ internal record Quantity
#pragma warning disable 0649
public BaseDimensions BaseDimensions = new(); // Default to empty
- public string ValueType = "double";
public string BaseUnit = null!;
public bool GenerateArithmetic = true;
public bool Logarithmic = false;
diff --git a/CodeGen/PrefixInfo.cs b/CodeGen/PrefixInfo.cs
index 1ec641b3b6..e44c643c48 100644
--- a/CodeGen/PrefixInfo.cs
+++ b/CodeGen/PrefixInfo.cs
@@ -15,9 +15,6 @@ internal class PrefixInfo
public static readonly IReadOnlyDictionary Entries = new[]
{
- // Need to append 'd' suffix for double in order to later search/replace "d" with "m"
- // when creating decimal conversion functions in CodeGen.Generator.FixConversionFunctionsForDecimalValueTypes.
-
// SI prefixes
new PrefixInfo(Prefix.Yocto, "1e-24d", "y",(Chinese, "夭")),
new PrefixInfo(Prefix.Zepto, "1e-21d", "z",(Chinese, "仄")),
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs
index c4dc4f6742..8011ae4fef 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToAbsorbedDoseOfIonizingRadiation
///
public static class NumberToAbsorbedDoseOfIonizingRadiationExtensions
{
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Centigrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static AbsorbedDoseOfIonizingRadiation Centigrays(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromCentigrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Femtograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static AbsorbedDoseOfIonizingRadiation Femtograys(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromFemtograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Gigagrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static AbsorbedDoseOfIonizingRadiation Gigagrays(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromGigagrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Grays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static AbsorbedDoseOfIonizingRadiation Grays(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromGrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Kilograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static AbsorbedDoseOfIonizingRadiation Kilograys(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromKilograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Kilorads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -80,7 +80,7 @@ public static AbsorbedDoseOfIonizingRadiation Kilorads(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromKilorads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Megagrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -88,7 +88,7 @@ public static AbsorbedDoseOfIonizingRadiation Megagrays(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromMegagrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Megarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -96,7 +96,7 @@ public static AbsorbedDoseOfIonizingRadiation Megarads(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromMegarads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Micrograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -104,7 +104,7 @@ public static AbsorbedDoseOfIonizingRadiation Micrograys(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromMicrograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Milligrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -112,7 +112,7 @@ public static AbsorbedDoseOfIonizingRadiation Milligrays(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromMilligrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Millirads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -120,7 +120,7 @@ public static AbsorbedDoseOfIonizingRadiation Millirads(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromMillirads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Nanograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -128,7 +128,7 @@ public static AbsorbedDoseOfIonizingRadiation Nanograys(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromNanograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Petagrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -136,7 +136,7 @@ public static AbsorbedDoseOfIonizingRadiation Petagrays(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromPetagrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Picograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -144,7 +144,7 @@ public static AbsorbedDoseOfIonizingRadiation Picograys(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromPicograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Rads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -152,7 +152,7 @@ public static AbsorbedDoseOfIonizingRadiation Rads(this T value)
#endif
=> AbsorbedDoseOfIonizingRadiation.FromRads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Teragrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs
index 169625ebe9..53301e4bef 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToAcceleration
///
public static class NumberToAccelerationExtensions
{
- ///
+ ///
public static Acceleration CentimetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static Acceleration CentimetersPerSecondSquared(this T value)
#endif
=> Acceleration.FromCentimetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration DecimetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static Acceleration DecimetersPerSecondSquared(this T value)
#endif
=> Acceleration.FromDecimetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration FeetPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static Acceleration FeetPerSecondSquared(this T value)
#endif
=> Acceleration.FromFeetPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration InchesPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static Acceleration InchesPerSecondSquared(this T value)
#endif
=> Acceleration.FromInchesPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KilometersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static Acceleration KilometersPerSecondSquared(this T value)
#endif
=> Acceleration.FromKilometersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KnotsPerHour(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -80,7 +80,7 @@ public static Acceleration KnotsPerHour(this T value)
#endif
=> Acceleration.FromKnotsPerHour(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KnotsPerMinute(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -88,7 +88,7 @@ public static Acceleration KnotsPerMinute(this T value)
#endif
=> Acceleration.FromKnotsPerMinute(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KnotsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -96,7 +96,7 @@ public static Acceleration KnotsPerSecond(this T value)
#endif
=> Acceleration.FromKnotsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -104,7 +104,7 @@ public static Acceleration MetersPerSecondSquared(this T value)
#endif
=> Acceleration.FromMetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MicrometersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -112,7 +112,7 @@ public static Acceleration MicrometersPerSecondSquared(this T value)
#endif
=> Acceleration.FromMicrometersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MillimetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -120,7 +120,7 @@ public static Acceleration MillimetersPerSecondSquared(this T value)
#endif
=> Acceleration.FromMillimetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MillistandardGravity(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -128,7 +128,7 @@ public static Acceleration MillistandardGravity(this T value)
#endif
=> Acceleration.FromMillistandardGravity(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration NanometersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -136,7 +136,7 @@ public static Acceleration NanometersPerSecondSquared(this T value)
#endif
=> Acceleration.FromNanometersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration StandardGravity(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs
index 25fc55c494..4993b43931 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToAmountOfSubstance
///
public static class NumberToAmountOfSubstanceExtensions
{
- ///
+ ///
public static AmountOfSubstance Centimoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static AmountOfSubstance Centimoles(this T value)
#endif
=> AmountOfSubstance.FromCentimoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance CentipoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static AmountOfSubstance CentipoundMoles(this T value)
#endif
=> AmountOfSubstance.FromCentipoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Decimoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static AmountOfSubstance Decimoles(this T value)
#endif
=> AmountOfSubstance.FromDecimoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance DecipoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static AmountOfSubstance DecipoundMoles(this T value)
#endif
=> AmountOfSubstance.FromDecipoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Femtomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static AmountOfSubstance Femtomoles(this T value)
#endif
=> AmountOfSubstance.FromFemtomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Kilomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -80,7 +80,7 @@ public static AmountOfSubstance Kilomoles(this T value)
#endif
=> AmountOfSubstance.FromKilomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance KilopoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -88,7 +88,7 @@ public static AmountOfSubstance KilopoundMoles(this T value)
#endif
=> AmountOfSubstance.FromKilopoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Megamoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -96,7 +96,7 @@ public static AmountOfSubstance Megamoles(this T value)
#endif
=> AmountOfSubstance.FromMegamoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Micromoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -104,7 +104,7 @@ public static AmountOfSubstance Micromoles(this T value)
#endif
=> AmountOfSubstance.FromMicromoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance MicropoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -112,7 +112,7 @@ public static AmountOfSubstance MicropoundMoles(this T value)
#endif
=> AmountOfSubstance.FromMicropoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Millimoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -120,7 +120,7 @@ public static AmountOfSubstance Millimoles(this T value)
#endif
=> AmountOfSubstance.FromMillimoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance MillipoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -128,7 +128,7 @@ public static AmountOfSubstance MillipoundMoles(this T value)
#endif
=> AmountOfSubstance.FromMillipoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Moles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -136,7 +136,7 @@ public static AmountOfSubstance Moles(this T value)
#endif
=> AmountOfSubstance.FromMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Nanomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -144,7 +144,7 @@ public static AmountOfSubstance Nanomoles(this T value)
#endif
=> AmountOfSubstance.FromNanomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance NanopoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -152,7 +152,7 @@ public static AmountOfSubstance NanopoundMoles(this T value)
#endif
=> AmountOfSubstance.FromNanopoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Picomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -160,7 +160,7 @@ public static AmountOfSubstance Picomoles(this T value)
#endif
=> AmountOfSubstance.FromPicomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance PoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs
index 1f3d3ae750..778ee3b019 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToAmplitudeRatio
///
public static class NumberToAmplitudeRatioExtensions
{
- ///
+ ///
public static AmplitudeRatio DecibelMicrovolts(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static AmplitudeRatio DecibelMicrovolts(this T value)
#endif
=> AmplitudeRatio.FromDecibelMicrovolts(Convert.ToDouble(value));
- ///
+ ///
public static AmplitudeRatio DecibelMillivolts(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static AmplitudeRatio DecibelMillivolts(this T value)
#endif
=> AmplitudeRatio.FromDecibelMillivolts(Convert.ToDouble(value));
- ///
+ ///
public static AmplitudeRatio DecibelsUnloaded(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static AmplitudeRatio DecibelsUnloaded(this T value)
#endif
=> AmplitudeRatio.FromDecibelsUnloaded(Convert.ToDouble(value));
- ///
+ ///
public static AmplitudeRatio DecibelVolts(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs
index 947e4fc504..538044922c 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAngleExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToAngle
///
public static class NumberToAngleExtensions
{
- ///
+ ///
public static Angle Arcminutes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static Angle Arcminutes(this T value)
#endif
=> Angle.FromArcminutes(Convert.ToDouble(value));
- ///
+ ///
public static Angle Arcseconds(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static Angle Arcseconds(this T value)
#endif
=> Angle.FromArcseconds(Convert.ToDouble(value));
- ///
+ ///
public static Angle Centiradians(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static Angle Centiradians(this T value)
#endif
=> Angle.FromCentiradians(Convert.ToDouble(value));
- ///
+ ///
public static Angle Deciradians(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static Angle Deciradians(this T value)
#endif
=> Angle.FromDeciradians(Convert.ToDouble(value));
- ///
+ ///
public static Angle Degrees(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static Angle Degrees(this T value)
#endif
=> Angle.FromDegrees(Convert.ToDouble(value));
- ///
+ ///
public static Angle Gradians(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -80,7 +80,7 @@ public static Angle Gradians(this T value)
#endif
=> Angle.FromGradians(Convert.ToDouble(value));
- ///
+ ///
public static Angle Microdegrees(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -88,7 +88,7 @@ public static Angle Microdegrees(this T value)
#endif
=> Angle.FromMicrodegrees(Convert.ToDouble(value));
- ///
+ ///
public static Angle Microradians(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -96,7 +96,7 @@ public static Angle Microradians(this T value)
#endif
=> Angle.FromMicroradians(Convert.ToDouble(value));
- ///
+ ///
public static Angle Millidegrees(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -104,7 +104,7 @@ public static Angle Millidegrees(this T value)
#endif
=> Angle.FromMillidegrees(Convert.ToDouble(value));
- ///
+ ///
public static Angle Milliradians(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -112,7 +112,7 @@ public static Angle Milliradians(this T value)
#endif
=> Angle.FromMilliradians(Convert.ToDouble(value));
- ///
+ ///
public static Angle Nanodegrees(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -120,7 +120,7 @@ public static Angle Nanodegrees(this T value)
#endif
=> Angle.FromNanodegrees(Convert.ToDouble(value));
- ///
+ ///
public static Angle Nanoradians(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -128,7 +128,7 @@ public static Angle Nanoradians(this T value)
#endif
=> Angle.FromNanoradians(Convert.ToDouble(value));
- ///
+ ///
public static Angle NatoMils(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -136,7 +136,7 @@ public static Angle NatoMils(this T value)
#endif
=> Angle.FromNatoMils(Convert.ToDouble(value));
- ///
+ ///
public static Angle Radians(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -144,7 +144,7 @@ public static Angle Radians(this T value)
#endif
=> Angle.FromRadians(Convert.ToDouble(value));
- ///
+ ///
public static Angle Revolutions(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -152,7 +152,7 @@ public static Angle Revolutions(this T value)
#endif
=> Angle.FromRevolutions(Convert.ToDouble(value));
- ///
+ ///
public static Angle Tilt(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs
index 9d22f10bd9..4f5e9aa218 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToApparentEnergy
///
public static class NumberToApparentEnergyExtensions
{
- ///
+ ///
public static ApparentEnergy KilovoltampereHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static ApparentEnergy KilovoltampereHours(this T value)
#endif
=> ApparentEnergy.FromKilovoltampereHours(Convert.ToDouble(value));
- ///
+ ///
public static ApparentEnergy MegavoltampereHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static ApparentEnergy MegavoltampereHours(this T value)
#endif
=> ApparentEnergy.FromMegavoltampereHours(Convert.ToDouble(value));
- ///
+ ///
public static ApparentEnergy VoltampereHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs
index 9cf9e6ed71..7fb405d7e3 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToApparentPower
///
public static class NumberToApparentPowerExtensions
{
- ///
+ ///
public static ApparentPower Gigavoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static ApparentPower Gigavoltamperes(this T value)
#endif
=> ApparentPower.FromGigavoltamperes(Convert.ToDouble(value));
- ///
+ ///
public static ApparentPower Kilovoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static ApparentPower Kilovoltamperes(this T value)
#endif
=> ApparentPower.FromKilovoltamperes(Convert.ToDouble(value));
- ///
+ ///
public static ApparentPower Megavoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static ApparentPower Megavoltamperes(this T value)
#endif
=> ApparentPower.FromMegavoltamperes(Convert.ToDouble(value));
- ///
+ ///
public static ApparentPower Microvoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static ApparentPower Microvoltamperes(this T value)
#endif
=> ApparentPower.FromMicrovoltamperes(Convert.ToDouble(value));
- ///
+ ///
public static ApparentPower Millivoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static ApparentPower Millivoltamperes(this T value)
#endif
=> ApparentPower.FromMillivoltamperes(Convert.ToDouble(value));
- ///
+ ///
public static ApparentPower Voltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs
index fa13776c9c..ad2a5a212a 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaDensityExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToAreaDensity
///
public static class NumberToAreaDensityExtensions
{
- ///
+ ///
public static AreaDensity GramsPerSquareMeter(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static AreaDensity GramsPerSquareMeter(this T value)
#endif
=> AreaDensity.FromGramsPerSquareMeter(Convert.ToDouble(value));
- ///
+ ///
public static AreaDensity KilogramsPerSquareMeter(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static AreaDensity KilogramsPerSquareMeter(this T value)
#endif
=> AreaDensity.FromKilogramsPerSquareMeter(Convert.ToDouble(value));
- ///
+ ///
public static AreaDensity MilligramsPerSquareMeter(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs
index 8669dd728a..11c81e72b1 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToArea
///
public static class NumberToAreaExtensions
{
- ///
+ ///
public static Area Acres(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static Area Acres(this T value)
#endif
=> Area.FromAcres(Convert.ToDouble(value));
- ///
+ ///
public static Area Hectares(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static Area Hectares(this T value)
#endif
=> Area.FromHectares(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareCentimeters(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static Area SquareCentimeters(this T value)
#endif
=> Area.FromSquareCentimeters(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareDecimeters(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static Area SquareDecimeters(this T value)
#endif
=> Area.FromSquareDecimeters(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareFeet(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static Area SquareFeet(this T value)
#endif
=> Area.FromSquareFeet(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareInches(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -80,7 +80,7 @@ public static Area SquareInches(this T value)
#endif
=> Area.FromSquareInches(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareKilometers(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -88,7 +88,7 @@ public static Area SquareKilometers(this T value)
#endif
=> Area.FromSquareKilometers(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareMeters(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -96,7 +96,7 @@ public static Area SquareMeters(this T value)
#endif
=> Area.FromSquareMeters(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareMicrometers(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -104,7 +104,7 @@ public static Area SquareMicrometers(this T value)
#endif
=> Area.FromSquareMicrometers(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareMiles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -112,7 +112,7 @@ public static Area SquareMiles(this T value)
#endif
=> Area.FromSquareMiles(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareMillimeters(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -120,7 +120,7 @@ public static Area SquareMillimeters(this T value)
#endif
=> Area.FromSquareMillimeters(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareNauticalMiles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -128,7 +128,7 @@ public static Area SquareNauticalMiles(this T value)
#endif
=> Area.FromSquareNauticalMiles(Convert.ToDouble(value));
- ///
+ ///
public static Area SquareYards(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -136,7 +136,7 @@ public static Area SquareYards(this T value)
#endif
=> Area.FromSquareYards(Convert.ToDouble(value));
- ///
+ ///
public static Area UsSurveySquareFeet(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs
index 7835b4d707..09807623e6 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAreaMomentOfInertiaExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToAreaMomentOfInertia
///
public static class NumberToAreaMomentOfInertiaExtensions
{
- ///
+ ///
public static AreaMomentOfInertia CentimetersToTheFourth(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static AreaMomentOfInertia CentimetersToTheFourth(this T value)
#endif
=> AreaMomentOfInertia.FromCentimetersToTheFourth(Convert.ToDouble(value));
- ///
+ ///
public static AreaMomentOfInertia DecimetersToTheFourth(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static AreaMomentOfInertia DecimetersToTheFourth(this T value)
#endif
=> AreaMomentOfInertia.FromDecimetersToTheFourth(Convert.ToDouble(value));
- ///
+ ///
public static AreaMomentOfInertia FeetToTheFourth(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static AreaMomentOfInertia FeetToTheFourth(this T value)
#endif
=> AreaMomentOfInertia.FromFeetToTheFourth(Convert.ToDouble(value));
- ///
+ ///
public static AreaMomentOfInertia InchesToTheFourth(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static AreaMomentOfInertia InchesToTheFourth(this T value)
#endif
=> AreaMomentOfInertia.FromInchesToTheFourth(Convert.ToDouble(value));
- ///
+ ///
public static AreaMomentOfInertia MetersToTheFourth(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static AreaMomentOfInertia MetersToTheFourth(this T value)
#endif
=> AreaMomentOfInertia.FromMetersToTheFourth(Convert.ToDouble(value));
- ///
+ ///
public static AreaMomentOfInertia MillimetersToTheFourth(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs
index bdc4de545f..2f85da9ccc 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBitRateExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToBitRate
///
public static class NumberToBitRateExtensions
{
- ///
+ ///
public static BitRate BitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static BitRate BitsPerSecond(this T value)
#endif
=> BitRate.FromBitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate BytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static BitRate BytesPerSecond(this T value)
#endif
=> BitRate.FromBytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate ExabitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static BitRate ExabitsPerSecond(this T value)
#endif
=> BitRate.FromExabitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate ExabytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,7 +64,7 @@ public static BitRate ExabytesPerSecond(this T value)
#endif
=> BitRate.FromExabytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate ExbibitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -72,7 +72,7 @@ public static BitRate ExbibitsPerSecond(this T value)
#endif
=> BitRate.FromExbibitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate ExbibytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -80,7 +80,7 @@ public static BitRate ExbibytesPerSecond(this T value)
#endif
=> BitRate.FromExbibytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate GibibitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -88,7 +88,7 @@ public static BitRate GibibitsPerSecond(this T value)
#endif
=> BitRate.FromGibibitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate GibibytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -96,7 +96,7 @@ public static BitRate GibibytesPerSecond(this T value)
#endif
=> BitRate.FromGibibytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate GigabitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -104,7 +104,7 @@ public static BitRate GigabitsPerSecond(this T value)
#endif
=> BitRate.FromGigabitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate GigabytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -112,7 +112,7 @@ public static BitRate GigabytesPerSecond(this T value)
#endif
=> BitRate.FromGigabytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate KibibitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -120,7 +120,7 @@ public static BitRate KibibitsPerSecond(this T value)
#endif
=> BitRate.FromKibibitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate KibibytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -128,7 +128,7 @@ public static BitRate KibibytesPerSecond(this T value)
#endif
=> BitRate.FromKibibytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate KilobitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -136,7 +136,7 @@ public static BitRate KilobitsPerSecond(this T value)
#endif
=> BitRate.FromKilobitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate KilobytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -144,7 +144,7 @@ public static BitRate KilobytesPerSecond(this T value)
#endif
=> BitRate.FromKilobytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate MebibitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -152,7 +152,7 @@ public static BitRate MebibitsPerSecond(this T value)
#endif
=> BitRate.FromMebibitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate MebibytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -160,7 +160,7 @@ public static BitRate MebibytesPerSecond(this T value)
#endif
=> BitRate.FromMebibytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate MegabitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -168,7 +168,7 @@ public static BitRate MegabitsPerSecond(this T value)
#endif
=> BitRate.FromMegabitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate MegabytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -176,7 +176,7 @@ public static BitRate MegabytesPerSecond(this T value)
#endif
=> BitRate.FromMegabytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate PebibitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -184,7 +184,7 @@ public static BitRate PebibitsPerSecond(this T value)
#endif
=> BitRate.FromPebibitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate PebibytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -192,7 +192,7 @@ public static BitRate PebibytesPerSecond(this T value)
#endif
=> BitRate.FromPebibytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate PetabitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -200,7 +200,7 @@ public static BitRate PetabitsPerSecond(this T value)
#endif
=> BitRate.FromPetabitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate PetabytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -208,7 +208,7 @@ public static BitRate PetabytesPerSecond(this T value)
#endif
=> BitRate.FromPetabytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate TebibitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -216,7 +216,7 @@ public static BitRate TebibitsPerSecond(this T value)
#endif
=> BitRate.FromTebibitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate TebibytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -224,7 +224,7 @@ public static BitRate TebibytesPerSecond(this T value)
#endif
=> BitRate.FromTebibytesPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate TerabitsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -232,7 +232,7 @@ public static BitRate TerabitsPerSecond(this T value)
#endif
=> BitRate.FromTerabitsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static BitRate TerabytesPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs
index 1eb91c5977..bfffa5835f 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToBrakeSpecificFuelConsumption
///
public static class NumberToBrakeSpecificFuelConsumptionExtensions
{
- ///
+ ///
public static BrakeSpecificFuelConsumption GramsPerKiloWattHour(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static BrakeSpecificFuelConsumption GramsPerKiloWattHour(this T value)
#endif
=> BrakeSpecificFuelConsumption.FromGramsPerKiloWattHour(Convert.ToDouble(value));
- ///
+ ///
public static BrakeSpecificFuelConsumption KilogramsPerJoule(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static BrakeSpecificFuelConsumption KilogramsPerJoule(this T value)
#endif
=> BrakeSpecificFuelConsumption.FromKilogramsPerJoule(Convert.ToDouble(value));
- ///
+ ///
public static BrakeSpecificFuelConsumption PoundsPerMechanicalHorsepowerHour(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs
index b70ed1583e..ca11428455 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs
@@ -32,7 +32,7 @@ namespace UnitsNet.NumberExtensions.NumberToCapacitance
///
public static class NumberToCapacitanceExtensions
{
- ///
+ ///
public static Capacitance Farads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +40,7 @@ public static Capacitance Farads(this T value)
#endif
=> Capacitance.FromFarads(Convert.ToDouble(value));
- ///
+ ///
public static Capacitance Kilofarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +48,7 @@ public static Capacitance Kilofarads(this T value)
#endif
=> Capacitance.FromKilofarads(Convert.ToDouble(value));
- ///
+ ///
public static Capacitance Megafarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -56,7 +56,7 @@ public static Capacitance Megafarads(this T value)
#endif
=> Capacitance.FromMegafarads(Convert.ToDouble(value));
- ///