diff --git a/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs b/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
index 61749f5f08..750d30125c 100644
--- a/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
@@ -3,19 +3,11 @@
namespace CodeGen.Generators.UnitsNetGen
{
- internal class NumberExtensionsGenerator : GeneratorBase
+ internal class NumberExtensionsGenerator(Quantity quantity) : GeneratorBase
{
- private readonly Unit[] _units;
- private readonly string _quantityName;
-
- public NumberExtensionsGenerator(Quantity quantity)
- {
- if (quantity is null)
- throw new ArgumentNullException(nameof(quantity));
-
- _units = quantity.Units;
- _quantityName = quantity.Name;
- }
+ private readonly Quantity _quantity = quantity ?? throw new ArgumentNullException(nameof(quantity));
+ private readonly Unit[] _units = quantity.Units;
+ private readonly string _quantityName = quantity.Name;
public string Generate()
{
@@ -35,7 +27,10 @@ namespace UnitsNet.NumberExtensions.NumberTo{_quantityName}
{{
///
/// A number to {_quantityName} Extensions
- ///
+ /// ");
+
+ Writer.WLIfText(1, GetObsoleteAttributeOrNull(_quantity));
+ Writer.WL(@$"
public static class NumberTo{_quantityName}Extensions
{{");
@@ -47,7 +42,8 @@ public static class NumberTo{_quantityName}Extensions
Writer.WL(2, $@"
/// ");
- Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit.ObsoleteText));
+ // Include obsolete text from the quantity per extension method, to make it visible when the class is not explicitly referenced in code.
+ Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit.ObsoleteText ?? _quantity.ObsoleteText));
Writer.WL(2, $@"public static {_quantityName} {unit.PluralName}(this T value)
where T : notnull
@@ -63,6 +59,9 @@ public static class NumberTo{_quantityName}Extensions
return Writer.ToString();
}
+ ///
+ private static string? GetObsoleteAttributeOrNull(Quantity quantity) => GetObsoleteAttributeOrNull(quantity.ObsoleteText);
+
private static string? GetObsoleteAttributeOrNull(string? obsoleteText) =>
string.IsNullOrWhiteSpace(obsoleteText) ?
null :
diff --git a/Common/UnitDefinitions/ApparentEnergy.json b/Common/UnitDefinitions/ApparentEnergy.json
index f656a25c02..b9c3c4a874 100644
--- a/Common/UnitDefinitions/ApparentEnergy.json
+++ b/Common/UnitDefinitions/ApparentEnergy.json
@@ -2,6 +2,8 @@
"Name": "ApparentEnergy",
"BaseUnit": "VoltampereHour",
"XmlDocSummary": "A unit for expressing the integral of apparent power over time, equal to the product of 1 volt-ampere and 1 hour, or to 3600 joules.",
+ "XmlDocRemarks": " has been renamed to , and will be removed in a later major version.",
+ "ObsoleteText": "ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.",
"BaseDimensions": {
"L": 2,
"M": 1,
diff --git a/Common/UnitDefinitions/ApparentPower.json b/Common/UnitDefinitions/ApparentPower.json
index 5dfbd47b57..631d1285b8 100644
--- a/Common/UnitDefinitions/ApparentPower.json
+++ b/Common/UnitDefinitions/ApparentPower.json
@@ -2,6 +2,8 @@
"Name": "ApparentPower",
"BaseUnit": "Voltampere",
"XmlDocSummary": "Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. Apparent power is the product of the root-mean-square of voltage and current.",
+ "XmlDocRemarks": " has been renamed to , and will be removed in a later major version.",
+ "ObsoleteText": "ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.",
"BaseDimensions": {
"L": 2,
"M": 1,
diff --git a/Common/UnitDefinitions/Capacitance.json b/Common/UnitDefinitions/Capacitance.json
index a7e88a5985..edf2c68aa7 100644
--- a/Common/UnitDefinitions/Capacitance.json
+++ b/Common/UnitDefinitions/Capacitance.json
@@ -2,7 +2,8 @@
"Name": "Capacitance",
"BaseUnit": "Farad",
"XmlDocSummary": "Capacitance is the ability of a body to store an electric charge.",
- "XmlDocRemarks": "https://en.wikipedia.org/wiki/Capacitance",
+ "XmlDocRemarks": " has been renamed to , and will be removed in a later major version.",
+ "ObsoleteText": "Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.",
"BaseDimensions": {
"L": -2,
"M": -1,
diff --git a/Common/UnitDefinitions/ElectricAdmittance.json b/Common/UnitDefinitions/ElectricAdmittance.json
index 4c75bbf0f1..38c539237b 100644
--- a/Common/UnitDefinitions/ElectricAdmittance.json
+++ b/Common/UnitDefinitions/ElectricAdmittance.json
@@ -1,7 +1,9 @@
{
"Name": "ElectricAdmittance",
"BaseUnit": "Siemens",
- "XmlDocSummary": "Electric admittance is a measure of how easily a circuit or device will allow a current to flow. It is defined as the inverse of impedance. The SI unit of admittance is the siemens (symbol S).",
+ "XmlDocSummary": "Electric admittance is a measure of how easily a circuit or device will allow a current to flow by the combined effect of conductance and susceptance in a circuit. It is defined as the inverse of impedance. The SI unit of admittance is the siemens (symbol S).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Electrical_admittance",
+ "ObsoleteText": "Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.",
"BaseDimensions": {
"L": -2,
"M": -1,
@@ -14,13 +16,26 @@
"PluralName": "Siemens",
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Nano", "Micro", "Milli" ],
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "S" ]
}
]
+ },
+ {
+ "SingularName": "Mho",
+ "PluralName": "Mhos",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "℧" ]
+ }
+ ]
}
]
}
diff --git a/Common/UnitDefinitions/ElectricApparentEnergy.json b/Common/UnitDefinitions/ElectricApparentEnergy.json
new file mode 100644
index 0000000000..0a04777f90
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricApparentEnergy.json
@@ -0,0 +1,25 @@
+{
+ "Name": "ElectricApparentEnergy",
+ "BaseUnit": "VoltampereHour",
+ "XmlDocSummary": "A unit for expressing the integral of apparent power over time, equal to the product of 1 volt-ampere and 1 hour, or to 3600 joules.",
+ "BaseDimensions": {
+ "L": 2,
+ "M": 1,
+ "T": -2
+ },
+ "Units": [
+ {
+ "SingularName": "VoltampereHour",
+ "PluralName": "VoltampereHours",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Kilo", "Mega" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "VAh" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ElectricApparentPower.json b/Common/UnitDefinitions/ElectricApparentPower.json
new file mode 100644
index 0000000000..4173ef577b
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricApparentPower.json
@@ -0,0 +1,26 @@
+{
+ "Name": "ElectricApparentPower",
+ "BaseUnit": "Voltampere",
+ "XmlDocSummary": "Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. It is the product of the root mean square voltage (in volts) and the root mean square current (in amperes).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/AC_power#Active,_reactive,_apparent,_and_complex_power_in_sinusoidal_steady-state",
+ "BaseDimensions": {
+ "L": 2,
+ "M": 1,
+ "T": -3
+ },
+ "Units": [
+ {
+ "SingularName": "Voltampere",
+ "PluralName": "Voltamperes",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Micro", "Milli", "Kilo", "Mega", "Giga" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "VA" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ElectricCapacitance.json b/Common/UnitDefinitions/ElectricCapacitance.json
new file mode 100644
index 0000000000..d8bfed5bd5
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricCapacitance.json
@@ -0,0 +1,33 @@
+{
+ "Name": "ElectricCapacitance",
+ "BaseUnit": "Farad",
+ "XmlDocSummary": "Capacitance is the capacity of a material object or device to store electric charge.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Capacitance",
+ "BaseDimensions": {
+ "L": -2,
+ "M": -1,
+ "T": 4,
+ "I": 2
+ },
+ "Units": [
+ {
+ "SingularName": "Farad",
+ "PluralName": "Farads",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Kilo", "Mega" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "F" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ElectricConductance.json b/Common/UnitDefinitions/ElectricConductance.json
index e1ef77d71b..910062df0d 100644
--- a/Common/UnitDefinitions/ElectricConductance.json
+++ b/Common/UnitDefinitions/ElectricConductance.json
@@ -1,7 +1,7 @@
{
"Name": "ElectricConductance",
"BaseUnit": "Siemens",
- "XmlDocSummary": "The electrical conductance of an electrical conductor is a measure of the easeness to pass an electric current through that conductor.",
+ "XmlDocSummary": "The electrical conductance of an object is a measure of the ease with which an electric current passes. Along with susceptance, it is one of two elements of admittance. Its reciprocal quantity is electrical resistance.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance",
"BaseDimensions": {
"L": -2,
@@ -15,13 +15,26 @@
"PluralName": "Siemens",
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Nano", "Micro", "Milli", "Kilo" ],
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "S" ]
}
]
+ },
+ {
+ "SingularName": "Mho",
+ "PluralName": "Mhos",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "℧" ]
+ }
+ ]
}
]
}
diff --git a/Common/UnitDefinitions/ElectricCurrent.json b/Common/UnitDefinitions/ElectricCurrent.json
index 91ee353446..8d3478b785 100644
--- a/Common/UnitDefinitions/ElectricCurrent.json
+++ b/Common/UnitDefinitions/ElectricCurrent.json
@@ -2,6 +2,7 @@
"Name": "ElectricCurrent",
"BaseUnit": "Ampere",
"XmlDocSummary": "An electric current is a flow of electric charge. In electric circuits this charge is often carried by moving electrons in a wire. It can also be carried by ions in an electrolyte, or by both ions and electrons such as in a plasma.",
+ "XmlDocRemarks": "If you want to map more parameters into the class (amps RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
"BaseDimensions": {
"I": 1
},
diff --git a/Common/UnitDefinitions/ElectricImpedance.json b/Common/UnitDefinitions/ElectricImpedance.json
new file mode 100644
index 0000000000..26c63c8540
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricImpedance.json
@@ -0,0 +1,28 @@
+{
+ "Name": "ElectricImpedance",
+ "BaseUnit": "Ohm",
+ "XmlDocSummary": "Electric impedance is the opposition to alternating current presented by the combined effect of resistance and reactance in a circuit. It is defined as the inverse of admittance. The SI unit of impedance is the ohm (symbol Ω).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Electrical_impedance",
+ "ObsoleteText": "Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.",
+ "BaseDimensions": {
+ "L": 2,
+ "M": 1,
+ "T": -3,
+ "I": -2
+ },
+ "Units": [
+ {
+ "SingularName": "Ohm",
+ "PluralName": "Ohms",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "Ω" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ElectricPotential.json b/Common/UnitDefinitions/ElectricPotential.json
index 83eeda0155..ebeb84cbe9 100644
--- a/Common/UnitDefinitions/ElectricPotential.json
+++ b/Common/UnitDefinitions/ElectricPotential.json
@@ -2,6 +2,7 @@
"Name": "ElectricPotential",
"BaseUnit": "Volt",
"XmlDocSummary": "In classical electromagnetism, the electric potential (a scalar quantity denoted by Φ, ΦE or V and also called the electric field potential or the electrostatic potential) at a point is the amount of electric potential energy that a unitary point charge would have when located at that point.",
+ "XmlDocRemarks": "If you want to map more parameters into the class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
"BaseDimensions": {
"L": 2,
"M": 1,
diff --git a/Common/UnitDefinitions/ElectricPotentialAc.json b/Common/UnitDefinitions/ElectricPotentialAc.json
index 4fd5eb435d..caf720eb5e 100644
--- a/Common/UnitDefinitions/ElectricPotentialAc.json
+++ b/Common/UnitDefinitions/ElectricPotentialAc.json
@@ -2,6 +2,8 @@
"Name": "ElectricPotentialAc",
"BaseUnit": "VoltAc",
"XmlDocSummary": "The Electric Potential of a system known to use Alternating Current.",
+ "XmlDocRemarks": " has been merged into , and will be removed in a later major version. If you want to map more parameters into the class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
+ "ObsoleteText": "ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
"Units": [
{
"SingularName": "VoltAc",
diff --git a/Common/UnitDefinitions/ElectricPotentialDc.json b/Common/UnitDefinitions/ElectricPotentialDc.json
index 734ac8bf70..20c268e91f 100644
--- a/Common/UnitDefinitions/ElectricPotentialDc.json
+++ b/Common/UnitDefinitions/ElectricPotentialDc.json
@@ -2,6 +2,8 @@
"Name": "ElectricPotentialDc",
"BaseUnit": "VoltDc",
"XmlDocSummary": "The Electric Potential of a system known to use Direct Current.",
+ "XmlDocRemarks": " has been merged into , and will be removed in a later major version. If you want to map more parameters into the class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
+ "ObsoleteText": "ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
"Units": [
{
"SingularName": "VoltDc",
diff --git a/Common/UnitDefinitions/ElectricReactance.json b/Common/UnitDefinitions/ElectricReactance.json
new file mode 100644
index 0000000000..fb18130d88
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricReactance.json
@@ -0,0 +1,27 @@
+{
+ "Name": "ElectricReactance",
+ "BaseUnit": "Ohm",
+ "XmlDocSummary": "In electrical circuits, reactance is the opposition presented to alternating current by inductance and capacitance. Along with resistance, it is one of two elements of impedance.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Electrical_reactance",
+ "BaseDimensions": {
+ "L": 2,
+ "M": 1,
+ "T": -3,
+ "I": -2
+ },
+ "Units": [
+ {
+ "SingularName": "Ohm",
+ "PluralName": "Ohms",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "Ω" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ElectricReactiveEnergy.json b/Common/UnitDefinitions/ElectricReactiveEnergy.json
new file mode 100644
index 0000000000..5b254898c6
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricReactiveEnergy.json
@@ -0,0 +1,25 @@
+{
+ "Name": "ElectricReactiveEnergy",
+ "BaseUnit": "VoltampereReactiveHour",
+ "XmlDocSummary": "The volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour.",
+ "BaseDimensions": {
+ "L": 2,
+ "M": 1,
+ "T": -2
+ },
+ "Units": [
+ {
+ "SingularName": "VoltampereReactiveHour",
+ "PluralName": "VoltampereReactiveHours",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Kilo", "Mega" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "varh" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ElectricReactivePower.json b/Common/UnitDefinitions/ElectricReactivePower.json
new file mode 100644
index 0000000000..8a689161ab
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricReactivePower.json
@@ -0,0 +1,26 @@
+{
+ "Name": "ElectricReactivePower",
+ "BaseUnit": "VoltampereReactive",
+ "XmlDocSummary": "In electric power transmission and distribution, volt-ampere reactive (var) is a unit of measurement of reactive power. Reactive power exists in an AC circuit when the current and voltage are not in phase.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/AC_power#Active,_reactive,_apparent,_and_complex_power_in_sinusoidal_steady-state",
+ "BaseDimensions": {
+ "L": 2,
+ "M": 1,
+ "T": -3
+ },
+ "Units": [
+ {
+ "SingularName": "VoltampereReactive",
+ "PluralName": "VoltamperesReactive",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Kilo", "Mega", "Giga" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "var" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ElectricResistance.json b/Common/UnitDefinitions/ElectricResistance.json
index 832806049f..edc5c60ece 100644
--- a/Common/UnitDefinitions/ElectricResistance.json
+++ b/Common/UnitDefinitions/ElectricResistance.json
@@ -1,7 +1,8 @@
{
"Name": "ElectricResistance",
"BaseUnit": "Ohm",
- "XmlDocSummary": "The electrical resistance of an electrical conductor is the opposition to the passage of an electric current through that conductor.",
+ "XmlDocSummary": "The electrical resistance of an object is a measure of its opposition to the flow of electric current. Along with reactance, it is one of two elements of impedance. Its reciprocal quantity is electrical conductance.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance",
"BaseDimensions": {
"L": 2,
"M": 1,
@@ -14,7 +15,7 @@
"PluralName": "Ohms",
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/ElectricSusceptance.json b/Common/UnitDefinitions/ElectricSusceptance.json
new file mode 100644
index 0000000000..05e8ad37cf
--- /dev/null
+++ b/Common/UnitDefinitions/ElectricSusceptance.json
@@ -0,0 +1,40 @@
+{
+ "Name": "ElectricSusceptance",
+ "BaseUnit": "Siemens",
+ "XmlDocSummary": "Electrical susceptance is the imaginary part of admittance, where the real part is conductance.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Electrical_susceptance",
+ "BaseDimensions": {
+ "L": -2,
+ "M": -1,
+ "T": 3,
+ "I": 2
+ },
+ "Units": [
+ {
+ "SingularName": "Siemens",
+ "PluralName": "Siemens",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "S" ]
+ }
+ ]
+ },
+ {
+ "SingularName": "Mho",
+ "PluralName": "Mhos",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "℧" ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/Common/UnitDefinitions/ReactiveEnergy.json b/Common/UnitDefinitions/ReactiveEnergy.json
index 3180621fcf..5e7f49cd60 100644
--- a/Common/UnitDefinitions/ReactiveEnergy.json
+++ b/Common/UnitDefinitions/ReactiveEnergy.json
@@ -2,10 +2,12 @@
"Name": "ReactiveEnergy",
"BaseUnit": "VoltampereReactiveHour",
"XmlDocSummary": "The Volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour.",
+ "XmlDocRemarks": " has been renamed to , and will be removed in a later major version.",
+ "ObsoleteText": "ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.",
"BaseDimensions": {
"L": 2,
"M": 1,
- "T": -1
+ "T": -2
},
"Units": [
{
diff --git a/Common/UnitDefinitions/ReactivePower.json b/Common/UnitDefinitions/ReactivePower.json
index 51c981cc83..39f43500e2 100644
--- a/Common/UnitDefinitions/ReactivePower.json
+++ b/Common/UnitDefinitions/ReactivePower.json
@@ -2,6 +2,8 @@
"Name": "ReactivePower",
"BaseUnit": "VoltampereReactive",
"XmlDocSummary": "Volt-ampere reactive (var) is a unit by which reactive power is expressed in an AC electric power system. Reactive power exists in an AC circuit when the current and voltage are not in phase.",
+ "XmlDocRemarks": " has been renamed to , and will be removed in a later major version.",
+ "ObsoleteText": "ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.",
"BaseDimensions": {
"L": 2,
"M": 1,
diff --git a/Common/UnitEnumValues.g.json b/Common/UnitEnumValues.g.json
index c667489e0e..59a164a718 100644
--- a/Common/UnitEnumValues.g.json
+++ b/Common/UnitEnumValues.g.json
@@ -259,7 +259,19 @@
"Microsiemens": 1,
"Millisiemens": 2,
"Nanosiemens": 3,
- "Siemens": 4
+ "Siemens": 4,
+ "Kilomho": 8,
+ "Mho": 7,
+ "Micromho": 12,
+ "Millimho": 5,
+ "Nanomho": 6,
+ "Gigamho": 16,
+ "Gigasiemens": 19,
+ "Kilosiemens": 14,
+ "Megamho": 10,
+ "Megasiemens": 13,
+ "Teramho": 15,
+ "Terasiemens": 9
},
"ElectricCharge": {
"AmpereHour": 1,
@@ -282,7 +294,18 @@
"Millisiemens": 2,
"Siemens": 3,
"Kilosiemens": 6,
- "Nanosiemens": 10
+ "Nanosiemens": 10,
+ "Kilomho": 15,
+ "Mho": 12,
+ "Micromho": 5,
+ "Millimho": 9,
+ "Nanomho": 14,
+ "Gigamho": 7,
+ "Gigasiemens": 18,
+ "Megamho": 8,
+ "Megasiemens": 17,
+ "Teramho": 19,
+ "Terasiemens": 16
},
"ElectricConductivity": {
"SiemensPerFoot": 1,
@@ -378,7 +401,8 @@
"Microohm": 4,
"Milliohm": 5,
"Ohm": 6,
- "Teraohm": 12
+ "Teraohm": 12,
+ "Nanoohm": 11
},
"ElectricResistivity": {
"KiloohmCentimeter": 1,
@@ -1903,5 +1927,76 @@
"MilligraySquareDecimeter": 17,
"MilligraySquareMeter": 11,
"MilligraySquareMillimeter": 12
+ },
+ "ElectricApparentEnergy": {
+ "KilovoltampereHour": 7,
+ "MegavoltampereHour": 3,
+ "VoltampereHour": 10
+ },
+ "ElectricApparentPower": {
+ "Gigavoltampere": 3,
+ "Kilovoltampere": 1,
+ "Megavoltampere": 2,
+ "Microvoltampere": 10,
+ "Millivoltampere": 6,
+ "Voltampere": 9
+ },
+ "ElectricCapacitance": {
+ "Farad": 3,
+ "Kilofarad": 8,
+ "Megafarad": 1,
+ "Microfarad": 7,
+ "Millifarad": 5,
+ "Nanofarad": 4,
+ "Picofarad": 10
+ },
+ "ElectricReactance": {
+ "Gigaohm": 5,
+ "Kiloohm": 8,
+ "Megaohm": 1,
+ "Microohm": 9,
+ "Milliohm": 4,
+ "Ohm": 6,
+ "Teraohm": 2,
+ "Nanoohm": 13
+ },
+ "ElectricReactiveEnergy": {
+ "KilovoltampereReactiveHour": 10,
+ "MegavoltampereReactiveHour": 4,
+ "VoltampereReactiveHour": 7
+ },
+ "ElectricReactivePower": {
+ "GigavoltampereReactive": 1,
+ "KilovoltampereReactive": 2,
+ "MegavoltampereReactive": 8,
+ "VoltampereReactive": 7
+ },
+ "ElectricSusceptance": {
+ "Kilomho": 8,
+ "Kilosiemens": 4,
+ "Mho": 7,
+ "Micromho": 9,
+ "Microsiemens": 10,
+ "Millimho": 3,
+ "Millisiemens": 6,
+ "Nanomho": 5,
+ "Nanosiemens": 1,
+ "Siemens": 2,
+ "Gigamho": 16,
+ "Gigasiemens": 15,
+ "Megamho": 12,
+ "Megasiemens": 19,
+ "Teramho": 20,
+ "Terasiemens": 14
+ },
+ "ElectricImpedance": {
+ "Gigaohm": 4,
+ "Kiloohm": 3,
+ "Megaohm": 10,
+ "Microohm": 8,
+ "Milliohm": 9,
+ "Nanoohm": 7,
+ "Ohm": 6,
+ "Teraohm": 5
}
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/ElectricApparentEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/ElectricApparentEnergy.nfproj
new file mode 100644
index 0000000000..ea49fc048a
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/ElectricApparentEnergy.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricApparentEnergy
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec
new file mode 100644
index 0000000000..825cee06bd
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricApparentEnergy
+ 5.64.0
+ Units.NET ElectricApparentEnergy - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricApparentEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electricapparentenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/ElectricApparentPower.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/ElectricApparentPower.nfproj
new file mode 100644
index 0000000000..fef4baa953
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/ElectricApparentPower.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricApparentPower
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec
new file mode 100644
index 0000000000..8c06d6102e
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricApparentPower
+ 5.64.0
+ Units.NET ElectricApparentPower - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricApparentPower units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electricapparentpower unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/ElectricCapacitance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/ElectricCapacitance.nfproj
new file mode 100644
index 0000000000..61417e0504
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/ElectricCapacitance.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {10e8cf6b-7fec-911f-770d-e3641296ac89}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricCapacitance
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec
new file mode 100644
index 0000000000..723ca6e5a6
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricCapacitance
+ 5.64.0
+ Units.NET ElectricCapacitance - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricCapacitance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electriccapacitance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/ElectricImpedance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/ElectricImpedance.nfproj
new file mode 100644
index 0000000000..e2416e308f
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/ElectricImpedance.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {23a79010-5c1a-9120-0992-a69c8dd80015}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricImpedance
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec
new file mode 100644
index 0000000000..f80c748ac6
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricImpedance
+ 5.64.0
+ Units.NET ElectricImpedance - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricImpedance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electricimpedance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/ElectricReactance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/ElectricReactance.nfproj
new file mode 100644
index 0000000000..137639125f
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/ElectricReactance.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {e3d3c1e3-aaa3-5d40-472e-ae837457cf73}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricReactance
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec
new file mode 100644
index 0000000000..07f2bb1674
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricReactance
+ 5.64.0
+ Units.NET ElectricReactance - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricReactance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electricreactance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/ElectricReactiveEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/ElectricReactiveEnergy.nfproj
new file mode 100644
index 0000000000..c159133d3b
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/ElectricReactiveEnergy.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {9f892c4e-26c2-1420-a73c-08138c8f6ca2}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricReactiveEnergy
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec
new file mode 100644
index 0000000000..a96c2b6afb
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricReactiveEnergy
+ 5.64.0
+ Units.NET ElectricReactiveEnergy - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricReactiveEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electricreactiveenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/ElectricReactivePower.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/ElectricReactivePower.nfproj
new file mode 100644
index 0000000000..f8385b3418
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/ElectricReactivePower.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricReactivePower
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec
new file mode 100644
index 0000000000..aa75300f0f
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricReactivePower
+ 5.64.0
+ Units.NET ElectricReactivePower - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricReactivePower units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electricreactivepower unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/ElectricSusceptance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/ElectricSusceptance.nfproj
new file mode 100644
index 0000000000..09618e3e01
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/ElectricSusceptance.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {544c006b-f7de-21a9-a1b4-8df710e184c8}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.ElectricSusceptance
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec
new file mode 100644
index 0000000000..43b804f8f0
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricSusceptance
+ 5.64.0
+ Units.NET ElectricSusceptance - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT-0
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds ElectricSusceptance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
+
+
+ Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
+ en-US
+ nanoframework electricsusceptance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentEnergy.g.cs
index 93ca9b395d..5c8c79aeea 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentEnergy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentEnergy.g.cs
@@ -26,6 +26,10 @@ namespace UnitsNet
///
/// A unit for expressing the integral of apparent power over time, equal to the product of 1 volt-ampere and 1 hour, or to 3600 joules.
///
+ ///
+ /// has been renamed to , and will be removed in a later major version.
+ ///
+ [Obsolete("ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.")]
public struct ApparentEnergy
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentPower.g.cs
index 36cc578a13..4ee15e6546 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentPower.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentPower.g.cs
@@ -26,6 +26,10 @@ namespace UnitsNet
///
/// Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. Apparent power is the product of the root-mean-square of voltage and current.
///
+ ///
+ /// has been renamed to , and will be removed in a later major version.
+ ///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public struct ApparentPower
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Capacitance.g.cs
index 17b0c3be7e..87626574c1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Capacitance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Capacitance.g.cs
@@ -27,8 +27,9 @@ namespace UnitsNet
/// Capacitance is the ability of a body to store an electric charge.
///
///
- /// https://en.wikipedia.org/wiki/Capacitance
+ /// has been renamed to , and will be removed in a later major version.
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public struct Capacitance
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs
index 7a37910556..a31ec25e9b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs
@@ -24,8 +24,12 @@ namespace UnitsNet
{
///
///
- /// Electric admittance is a measure of how easily a circuit or device will allow a current to flow. It is defined as the inverse of impedance. The SI unit of admittance is the siemens (symbol S).
+ /// Electric admittance is a measure of how easily a circuit or device will allow a current to flow by the combined effect of conductance and susceptance in a circuit. It is defined as the inverse of impedance. The SI unit of admittance is the siemens (symbol S).
///
+ ///
+ /// https://en.wikipedia.org/wiki/Electrical_admittance
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
public struct ElectricAdmittance
{
///
@@ -79,16 +83,66 @@ public ElectricAdmittance(double value, ElectricAdmittanceUnit unit)
public static ElectricAdmittance Zero { get; } = new ElectricAdmittance(0, BaseUnit);
#region Conversion Properties
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigamhos => As(ElectricAdmittanceUnit.Gigamho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigasiemens => As(ElectricAdmittanceUnit.Gigasiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kilomhos => As(ElectricAdmittanceUnit.Kilomho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kilosiemens => As(ElectricAdmittanceUnit.Kilosiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megamhos => As(ElectricAdmittanceUnit.Megamho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megasiemens => As(ElectricAdmittanceUnit.Megasiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Mhos => As(ElectricAdmittanceUnit.Mho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Micromhos => As(ElectricAdmittanceUnit.Micromho);
+
///
/// Gets a value of this quantity converted into
///
public double Microsiemens => As(ElectricAdmittanceUnit.Microsiemens);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Millimhos => As(ElectricAdmittanceUnit.Millimho);
+
///
/// Gets a value of this quantity converted into
///
public double Millisiemens => As(ElectricAdmittanceUnit.Millisiemens);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanomhos => As(ElectricAdmittanceUnit.Nanomho);
+
///
/// Gets a value of this quantity converted into
///
@@ -99,22 +153,92 @@ public ElectricAdmittance(double value, ElectricAdmittanceUnit unit)
///
public double Siemens => As(ElectricAdmittanceUnit.Siemens);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Teramhos => As(ElectricAdmittanceUnit.Teramho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Terasiemens => As(ElectricAdmittanceUnit.Terasiemens);
+
#endregion
#region Static Factory Methods
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromGigamhos(double gigamhos) => new ElectricAdmittance(gigamhos, ElectricAdmittanceUnit.Gigamho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromGigasiemens(double gigasiemens) => new ElectricAdmittance(gigasiemens, ElectricAdmittanceUnit.Gigasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromKilomhos(double kilomhos) => new ElectricAdmittance(kilomhos, ElectricAdmittanceUnit.Kilomho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromKilosiemens(double kilosiemens) => new ElectricAdmittance(kilosiemens, ElectricAdmittanceUnit.Kilosiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromMegamhos(double megamhos) => new ElectricAdmittance(megamhos, ElectricAdmittanceUnit.Megamho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromMegasiemens(double megasiemens) => new ElectricAdmittance(megasiemens, ElectricAdmittanceUnit.Megasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromMhos(double mhos) => new ElectricAdmittance(mhos, ElectricAdmittanceUnit.Mho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromMicromhos(double micromhos) => new ElectricAdmittance(micromhos, ElectricAdmittanceUnit.Micromho);
+
///
/// Creates a from .
///
/// If value is NaN or Infinity.
public static ElectricAdmittance FromMicrosiemens(double microsiemens) => new ElectricAdmittance(microsiemens, ElectricAdmittanceUnit.Microsiemens);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromMillimhos(double millimhos) => new ElectricAdmittance(millimhos, ElectricAdmittanceUnit.Millimho);
+
///
/// Creates a from .
///
/// If value is NaN or Infinity.
public static ElectricAdmittance FromMillisiemens(double millisiemens) => new ElectricAdmittance(millisiemens, ElectricAdmittanceUnit.Millisiemens);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromNanomhos(double nanomhos) => new ElectricAdmittance(nanomhos, ElectricAdmittanceUnit.Nanomho);
+
///
/// Creates a from .
///
@@ -127,6 +251,18 @@ public ElectricAdmittance(double value, ElectricAdmittanceUnit unit)
/// If value is NaN or Infinity.
public static ElectricAdmittance FromSiemens(double siemens) => new ElectricAdmittance(siemens, ElectricAdmittanceUnit.Siemens);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromTeramhos(double teramhos) => new ElectricAdmittance(teramhos, ElectricAdmittanceUnit.Teramho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricAdmittance FromTerasiemens(double terasiemens) => new ElectricAdmittance(terasiemens, ElectricAdmittanceUnit.Terasiemens);
+
///
/// Dynamically convert from value and unit enum to .
///
@@ -167,10 +303,22 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
+ ElectricAdmittanceUnit.Gigamho => (_value) * 1e9d,
+ ElectricAdmittanceUnit.Gigasiemens => (_value) * 1e9d,
+ ElectricAdmittanceUnit.Kilomho => (_value) * 1e3d,
+ ElectricAdmittanceUnit.Kilosiemens => (_value) * 1e3d,
+ ElectricAdmittanceUnit.Megamho => (_value) * 1e6d,
+ ElectricAdmittanceUnit.Megasiemens => (_value) * 1e6d,
+ ElectricAdmittanceUnit.Mho => _value,
+ ElectricAdmittanceUnit.Micromho => (_value) * 1e-6d,
ElectricAdmittanceUnit.Microsiemens => (_value) * 1e-6d,
+ ElectricAdmittanceUnit.Millimho => (_value) * 1e-3d,
ElectricAdmittanceUnit.Millisiemens => (_value) * 1e-3d,
+ ElectricAdmittanceUnit.Nanomho => (_value) * 1e-9d,
ElectricAdmittanceUnit.Nanosiemens => (_value) * 1e-9d,
ElectricAdmittanceUnit.Siemens => _value,
+ ElectricAdmittanceUnit.Teramho => (_value) * 1e12d,
+ ElectricAdmittanceUnit.Terasiemens => (_value) * 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -184,10 +332,22 @@ private double GetValueAs(ElectricAdmittanceUnit unit)
return unit switch
{
+ ElectricAdmittanceUnit.Gigamho => (baseUnitValue) / 1e9d,
+ ElectricAdmittanceUnit.Gigasiemens => (baseUnitValue) / 1e9d,
+ ElectricAdmittanceUnit.Kilomho => (baseUnitValue) / 1e3d,
+ ElectricAdmittanceUnit.Kilosiemens => (baseUnitValue) / 1e3d,
+ ElectricAdmittanceUnit.Megamho => (baseUnitValue) / 1e6d,
+ ElectricAdmittanceUnit.Megasiemens => (baseUnitValue) / 1e6d,
+ ElectricAdmittanceUnit.Mho => baseUnitValue,
+ ElectricAdmittanceUnit.Micromho => (baseUnitValue) / 1e-6d,
ElectricAdmittanceUnit.Microsiemens => (baseUnitValue) / 1e-6d,
+ ElectricAdmittanceUnit.Millimho => (baseUnitValue) / 1e-3d,
ElectricAdmittanceUnit.Millisiemens => (baseUnitValue) / 1e-3d,
+ ElectricAdmittanceUnit.Nanomho => (baseUnitValue) / 1e-9d,
ElectricAdmittanceUnit.Nanosiemens => (baseUnitValue) / 1e-9d,
ElectricAdmittanceUnit.Siemens => baseUnitValue,
+ ElectricAdmittanceUnit.Teramho => (baseUnitValue) / 1e12d,
+ ElectricAdmittanceUnit.Terasiemens => (baseUnitValue) / 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs
new file mode 100644
index 0000000000..de5f743907
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs
@@ -0,0 +1,185 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// A unit for expressing the integral of apparent power over time, equal to the product of 1 volt-ampere and 1 hour, or to 3600 joules.
+ ///
+ public struct ElectricApparentEnergy
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricApparentEnergyUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricApparentEnergyUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricApparentEnergy(double value, ElectricApparentEnergyUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricApparentEnergy, which is Second. All conversions go via this value.
+ ///
+ public static ElectricApparentEnergyUnit BaseUnit { get; } = ElectricApparentEnergyUnit.VoltampereHour;
+
+ ///
+ /// Represents the largest possible value of ElectricApparentEnergy.
+ ///
+ public static ElectricApparentEnergy MaxValue { get; } = new ElectricApparentEnergy(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricApparentEnergy.
+ ///
+ public static ElectricApparentEnergy MinValue { get; } = new ElectricApparentEnergy(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricApparentEnergy Zero { get; } = new ElectricApparentEnergy(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double KilovoltampereHours => As(ElectricApparentEnergyUnit.KilovoltampereHour);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double MegavoltampereHours => As(ElectricApparentEnergyUnit.MegavoltampereHour);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double VoltampereHours => As(ElectricApparentEnergyUnit.VoltampereHour);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentEnergy FromKilovoltampereHours(double kilovoltamperehours) => new ElectricApparentEnergy(kilovoltamperehours, ElectricApparentEnergyUnit.KilovoltampereHour);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentEnergy FromMegavoltampereHours(double megavoltamperehours) => new ElectricApparentEnergy(megavoltamperehours, ElectricApparentEnergyUnit.MegavoltampereHour);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentEnergy FromVoltampereHours(double voltamperehours) => new ElectricApparentEnergy(voltamperehours, ElectricApparentEnergyUnit.VoltampereHour);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricApparentEnergy unit value.
+ public static ElectricApparentEnergy From(double value, ElectricApparentEnergyUnit fromUnit)
+ {
+ return new ElectricApparentEnergy(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricApparentEnergyUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricApparentEnergy to another ElectricApparentEnergy with the unit representation .
+ ///
+ /// A ElectricApparentEnergy with the specified unit.
+ public ElectricApparentEnergy ToUnit(ElectricApparentEnergyUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricApparentEnergy(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricApparentEnergyUnit.KilovoltampereHour => (_value) * 1e3d,
+ ElectricApparentEnergyUnit.MegavoltampereHour => (_value) * 1e6d,
+ ElectricApparentEnergyUnit.VoltampereHour => _value,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricApparentEnergyUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricApparentEnergyUnit.KilovoltampereHour => (baseUnitValue) / 1e3d,
+ ElectricApparentEnergyUnit.MegavoltampereHour => (baseUnitValue) / 1e6d,
+ ElectricApparentEnergyUnit.VoltampereHour => baseUnitValue,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs
new file mode 100644
index 0000000000..157f7091eb
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs
@@ -0,0 +1,227 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. It is the product of the root mean square voltage (in volts) and the root mean square current (in amperes).
+ ///
+ ///
+ /// https://en.wikipedia.org/wiki/AC_power#Active,_reactive,_apparent,_and_complex_power_in_sinusoidal_steady-state
+ ///
+ public struct ElectricApparentPower
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricApparentPowerUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricApparentPowerUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricApparentPower(double value, ElectricApparentPowerUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricApparentPower, which is Second. All conversions go via this value.
+ ///
+ public static ElectricApparentPowerUnit BaseUnit { get; } = ElectricApparentPowerUnit.Voltampere;
+
+ ///
+ /// Represents the largest possible value of ElectricApparentPower.
+ ///
+ public static ElectricApparentPower MaxValue { get; } = new ElectricApparentPower(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricApparentPower.
+ ///
+ public static ElectricApparentPower MinValue { get; } = new ElectricApparentPower(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricApparentPower Zero { get; } = new ElectricApparentPower(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigavoltamperes => As(ElectricApparentPowerUnit.Gigavoltampere);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kilovoltamperes => As(ElectricApparentPowerUnit.Kilovoltampere);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megavoltamperes => As(ElectricApparentPowerUnit.Megavoltampere);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Microvoltamperes => As(ElectricApparentPowerUnit.Microvoltampere);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Millivoltamperes => As(ElectricApparentPowerUnit.Millivoltampere);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Voltamperes => As(ElectricApparentPowerUnit.Voltampere);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentPower FromGigavoltamperes(double gigavoltamperes) => new ElectricApparentPower(gigavoltamperes, ElectricApparentPowerUnit.Gigavoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentPower FromKilovoltamperes(double kilovoltamperes) => new ElectricApparentPower(kilovoltamperes, ElectricApparentPowerUnit.Kilovoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentPower FromMegavoltamperes(double megavoltamperes) => new ElectricApparentPower(megavoltamperes, ElectricApparentPowerUnit.Megavoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentPower FromMicrovoltamperes(double microvoltamperes) => new ElectricApparentPower(microvoltamperes, ElectricApparentPowerUnit.Microvoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentPower FromMillivoltamperes(double millivoltamperes) => new ElectricApparentPower(millivoltamperes, ElectricApparentPowerUnit.Millivoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricApparentPower FromVoltamperes(double voltamperes) => new ElectricApparentPower(voltamperes, ElectricApparentPowerUnit.Voltampere);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricApparentPower unit value.
+ public static ElectricApparentPower From(double value, ElectricApparentPowerUnit fromUnit)
+ {
+ return new ElectricApparentPower(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricApparentPowerUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricApparentPower to another ElectricApparentPower with the unit representation .
+ ///
+ /// A ElectricApparentPower with the specified unit.
+ public ElectricApparentPower ToUnit(ElectricApparentPowerUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricApparentPower(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricApparentPowerUnit.Gigavoltampere => (_value) * 1e9d,
+ ElectricApparentPowerUnit.Kilovoltampere => (_value) * 1e3d,
+ ElectricApparentPowerUnit.Megavoltampere => (_value) * 1e6d,
+ ElectricApparentPowerUnit.Microvoltampere => (_value) * 1e-6d,
+ ElectricApparentPowerUnit.Millivoltampere => (_value) * 1e-3d,
+ ElectricApparentPowerUnit.Voltampere => _value,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricApparentPowerUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricApparentPowerUnit.Gigavoltampere => (baseUnitValue) / 1e9d,
+ ElectricApparentPowerUnit.Kilovoltampere => (baseUnitValue) / 1e3d,
+ ElectricApparentPowerUnit.Megavoltampere => (baseUnitValue) / 1e6d,
+ ElectricApparentPowerUnit.Microvoltampere => (baseUnitValue) / 1e-6d,
+ ElectricApparentPowerUnit.Millivoltampere => (baseUnitValue) / 1e-3d,
+ ElectricApparentPowerUnit.Voltampere => baseUnitValue,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs
new file mode 100644
index 0000000000..267671bcd0
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs
@@ -0,0 +1,240 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// Capacitance is the capacity of a material object or device to store electric charge.
+ ///
+ ///
+ /// https://en.wikipedia.org/wiki/Capacitance
+ ///
+ public struct ElectricCapacitance
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricCapacitanceUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricCapacitanceUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricCapacitance(double value, ElectricCapacitanceUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricCapacitance, which is Second. All conversions go via this value.
+ ///
+ public static ElectricCapacitanceUnit BaseUnit { get; } = ElectricCapacitanceUnit.Farad;
+
+ ///
+ /// Represents the largest possible value of ElectricCapacitance.
+ ///
+ public static ElectricCapacitance MaxValue { get; } = new ElectricCapacitance(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricCapacitance.
+ ///
+ public static ElectricCapacitance MinValue { get; } = new ElectricCapacitance(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricCapacitance Zero { get; } = new ElectricCapacitance(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Farads => As(ElectricCapacitanceUnit.Farad);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kilofarads => As(ElectricCapacitanceUnit.Kilofarad);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megafarads => As(ElectricCapacitanceUnit.Megafarad);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Microfarads => As(ElectricCapacitanceUnit.Microfarad);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Millifarads => As(ElectricCapacitanceUnit.Millifarad);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanofarads => As(ElectricCapacitanceUnit.Nanofarad);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Picofarads => As(ElectricCapacitanceUnit.Picofarad);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricCapacitance FromFarads(double farads) => new ElectricCapacitance(farads, ElectricCapacitanceUnit.Farad);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricCapacitance FromKilofarads(double kilofarads) => new ElectricCapacitance(kilofarads, ElectricCapacitanceUnit.Kilofarad);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricCapacitance FromMegafarads(double megafarads) => new ElectricCapacitance(megafarads, ElectricCapacitanceUnit.Megafarad);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricCapacitance FromMicrofarads(double microfarads) => new ElectricCapacitance(microfarads, ElectricCapacitanceUnit.Microfarad);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricCapacitance FromMillifarads(double millifarads) => new ElectricCapacitance(millifarads, ElectricCapacitanceUnit.Millifarad);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricCapacitance FromNanofarads(double nanofarads) => new ElectricCapacitance(nanofarads, ElectricCapacitanceUnit.Nanofarad);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricCapacitance FromPicofarads(double picofarads) => new ElectricCapacitance(picofarads, ElectricCapacitanceUnit.Picofarad);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricCapacitance unit value.
+ public static ElectricCapacitance From(double value, ElectricCapacitanceUnit fromUnit)
+ {
+ return new ElectricCapacitance(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricCapacitanceUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricCapacitance to another ElectricCapacitance with the unit representation .
+ ///
+ /// A ElectricCapacitance with the specified unit.
+ public ElectricCapacitance ToUnit(ElectricCapacitanceUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricCapacitance(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricCapacitanceUnit.Farad => _value,
+ ElectricCapacitanceUnit.Kilofarad => (_value) * 1e3d,
+ ElectricCapacitanceUnit.Megafarad => (_value) * 1e6d,
+ ElectricCapacitanceUnit.Microfarad => (_value) * 1e-6d,
+ ElectricCapacitanceUnit.Millifarad => (_value) * 1e-3d,
+ ElectricCapacitanceUnit.Nanofarad => (_value) * 1e-9d,
+ ElectricCapacitanceUnit.Picofarad => (_value) * 1e-12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricCapacitanceUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricCapacitanceUnit.Farad => baseUnitValue,
+ ElectricCapacitanceUnit.Kilofarad => (baseUnitValue) / 1e3d,
+ ElectricCapacitanceUnit.Megafarad => (baseUnitValue) / 1e6d,
+ ElectricCapacitanceUnit.Microfarad => (baseUnitValue) / 1e-6d,
+ ElectricCapacitanceUnit.Millifarad => (baseUnitValue) / 1e-3d,
+ ElectricCapacitanceUnit.Nanofarad => (baseUnitValue) / 1e-9d,
+ ElectricCapacitanceUnit.Picofarad => (baseUnitValue) / 1e-12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs
index 0b88398b75..170bb5e888 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs
@@ -24,7 +24,7 @@ namespace UnitsNet
{
///
///
- /// The electrical conductance of an electrical conductor is a measure of the easeness to pass an electric current through that conductor.
+ /// The electrical conductance of an object is a measure of the ease with which an electric current passes. Along with susceptance, it is one of two elements of admittance. Its reciprocal quantity is electrical resistance.
///
///
/// https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance
@@ -82,21 +82,66 @@ public ElectricConductance(double value, ElectricConductanceUnit unit)
public static ElectricConductance Zero { get; } = new ElectricConductance(0, BaseUnit);
#region Conversion Properties
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigamhos => As(ElectricConductanceUnit.Gigamho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigasiemens => As(ElectricConductanceUnit.Gigasiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kilomhos => As(ElectricConductanceUnit.Kilomho);
+
///
/// Gets a value of this quantity converted into
///
public double Kilosiemens => As(ElectricConductanceUnit.Kilosiemens);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megamhos => As(ElectricConductanceUnit.Megamho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megasiemens => As(ElectricConductanceUnit.Megasiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Mhos => As(ElectricConductanceUnit.Mho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Micromhos => As(ElectricConductanceUnit.Micromho);
+
///
/// Gets a value of this quantity converted into
///
public double Microsiemens => As(ElectricConductanceUnit.Microsiemens);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Millimhos => As(ElectricConductanceUnit.Millimho);
+
///
/// Gets a value of this quantity converted into
///
public double Millisiemens => As(ElectricConductanceUnit.Millisiemens);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanomhos => As(ElectricConductanceUnit.Nanomho);
+
///
/// Gets a value of this quantity converted into
///
@@ -107,28 +152,92 @@ public ElectricConductance(double value, ElectricConductanceUnit unit)
///
public double Siemens => As(ElectricConductanceUnit.Siemens);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Teramhos => As(ElectricConductanceUnit.Teramho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Terasiemens => As(ElectricConductanceUnit.Terasiemens);
+
#endregion
#region Static Factory Methods
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromGigamhos(double gigamhos) => new ElectricConductance(gigamhos, ElectricConductanceUnit.Gigamho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromGigasiemens(double gigasiemens) => new ElectricConductance(gigasiemens, ElectricConductanceUnit.Gigasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromKilomhos(double kilomhos) => new ElectricConductance(kilomhos, ElectricConductanceUnit.Kilomho);
+
///
/// Creates a from .
///
/// If value is NaN or Infinity.
public static ElectricConductance FromKilosiemens(double kilosiemens) => new ElectricConductance(kilosiemens, ElectricConductanceUnit.Kilosiemens);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromMegamhos(double megamhos) => new ElectricConductance(megamhos, ElectricConductanceUnit.Megamho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromMegasiemens(double megasiemens) => new ElectricConductance(megasiemens, ElectricConductanceUnit.Megasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromMhos(double mhos) => new ElectricConductance(mhos, ElectricConductanceUnit.Mho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromMicromhos(double micromhos) => new ElectricConductance(micromhos, ElectricConductanceUnit.Micromho);
+
///
/// Creates a from .
///
/// If value is NaN or Infinity.
public static ElectricConductance FromMicrosiemens(double microsiemens) => new ElectricConductance(microsiemens, ElectricConductanceUnit.Microsiemens);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromMillimhos(double millimhos) => new ElectricConductance(millimhos, ElectricConductanceUnit.Millimho);
+
///
/// Creates a from .
///
/// If value is NaN or Infinity.
public static ElectricConductance FromMillisiemens(double millisiemens) => new ElectricConductance(millisiemens, ElectricConductanceUnit.Millisiemens);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromNanomhos(double nanomhos) => new ElectricConductance(nanomhos, ElectricConductanceUnit.Nanomho);
+
///
/// Creates a from .
///
@@ -141,6 +250,18 @@ public ElectricConductance(double value, ElectricConductanceUnit unit)
/// If value is NaN or Infinity.
public static ElectricConductance FromSiemens(double siemens) => new ElectricConductance(siemens, ElectricConductanceUnit.Siemens);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromTeramhos(double teramhos) => new ElectricConductance(teramhos, ElectricConductanceUnit.Teramho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricConductance FromTerasiemens(double terasiemens) => new ElectricConductance(terasiemens, ElectricConductanceUnit.Terasiemens);
+
///
/// Dynamically convert from value and unit enum to .
///
@@ -181,11 +302,22 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
+ ElectricConductanceUnit.Gigamho => (_value) * 1e9d,
+ ElectricConductanceUnit.Gigasiemens => (_value) * 1e9d,
+ ElectricConductanceUnit.Kilomho => (_value) * 1e3d,
ElectricConductanceUnit.Kilosiemens => (_value) * 1e3d,
+ ElectricConductanceUnit.Megamho => (_value) * 1e6d,
+ ElectricConductanceUnit.Megasiemens => (_value) * 1e6d,
+ ElectricConductanceUnit.Mho => _value,
+ ElectricConductanceUnit.Micromho => (_value) * 1e-6d,
ElectricConductanceUnit.Microsiemens => (_value) * 1e-6d,
+ ElectricConductanceUnit.Millimho => (_value) * 1e-3d,
ElectricConductanceUnit.Millisiemens => (_value) * 1e-3d,
+ ElectricConductanceUnit.Nanomho => (_value) * 1e-9d,
ElectricConductanceUnit.Nanosiemens => (_value) * 1e-9d,
ElectricConductanceUnit.Siemens => _value,
+ ElectricConductanceUnit.Teramho => (_value) * 1e12d,
+ ElectricConductanceUnit.Terasiemens => (_value) * 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -199,11 +331,22 @@ private double GetValueAs(ElectricConductanceUnit unit)
return unit switch
{
+ ElectricConductanceUnit.Gigamho => (baseUnitValue) / 1e9d,
+ ElectricConductanceUnit.Gigasiemens => (baseUnitValue) / 1e9d,
+ ElectricConductanceUnit.Kilomho => (baseUnitValue) / 1e3d,
ElectricConductanceUnit.Kilosiemens => (baseUnitValue) / 1e3d,
+ ElectricConductanceUnit.Megamho => (baseUnitValue) / 1e6d,
+ ElectricConductanceUnit.Megasiemens => (baseUnitValue) / 1e6d,
+ ElectricConductanceUnit.Mho => baseUnitValue,
+ ElectricConductanceUnit.Micromho => (baseUnitValue) / 1e-6d,
ElectricConductanceUnit.Microsiemens => (baseUnitValue) / 1e-6d,
+ ElectricConductanceUnit.Millimho => (baseUnitValue) / 1e-3d,
ElectricConductanceUnit.Millisiemens => (baseUnitValue) / 1e-3d,
+ ElectricConductanceUnit.Nanomho => (baseUnitValue) / 1e-9d,
ElectricConductanceUnit.Nanosiemens => (baseUnitValue) / 1e-9d,
ElectricConductanceUnit.Siemens => baseUnitValue,
+ ElectricConductanceUnit.Teramho => (baseUnitValue) / 1e12d,
+ ElectricConductanceUnit.Terasiemens => (baseUnitValue) / 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs
index 6ae5dd2476..7e424fae69 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs
@@ -26,6 +26,9 @@ namespace UnitsNet
///
/// An electric current is a flow of electric charge. In electric circuits this charge is often carried by moving electrons in a wire. It can also be carried by ions in an electrolyte, or by both ions and electrons such as in a plasma.
///
+ ///
+ /// If you want to map more parameters into the class (amps RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.
+ ///
public struct ElectricCurrent
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs
new file mode 100644
index 0000000000..f3bc61ef48
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs
@@ -0,0 +1,254 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// Electric impedance is the opposition to alternating current presented by the combined effect of resistance and reactance in a circuit. It is defined as the inverse of admittance. The SI unit of impedance is the ohm (symbol Ω).
+ ///
+ ///
+ /// https://en.wikipedia.org/wiki/Electrical_impedance
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public struct ElectricImpedance
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricImpedanceUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricImpedanceUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricImpedance(double value, ElectricImpedanceUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricImpedance, which is Second. All conversions go via this value.
+ ///
+ public static ElectricImpedanceUnit BaseUnit { get; } = ElectricImpedanceUnit.Ohm;
+
+ ///
+ /// Represents the largest possible value of ElectricImpedance.
+ ///
+ public static ElectricImpedance MaxValue { get; } = new ElectricImpedance(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricImpedance.
+ ///
+ public static ElectricImpedance MinValue { get; } = new ElectricImpedance(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricImpedance Zero { get; } = new ElectricImpedance(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigaohms => As(ElectricImpedanceUnit.Gigaohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kiloohms => As(ElectricImpedanceUnit.Kiloohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megaohms => As(ElectricImpedanceUnit.Megaohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Microohms => As(ElectricImpedanceUnit.Microohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Milliohms => As(ElectricImpedanceUnit.Milliohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanoohms => As(ElectricImpedanceUnit.Nanoohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Ohms => As(ElectricImpedanceUnit.Ohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Teraohms => As(ElectricImpedanceUnit.Teraohm);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromGigaohms(double gigaohms) => new ElectricImpedance(gigaohms, ElectricImpedanceUnit.Gigaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromKiloohms(double kiloohms) => new ElectricImpedance(kiloohms, ElectricImpedanceUnit.Kiloohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromMegaohms(double megaohms) => new ElectricImpedance(megaohms, ElectricImpedanceUnit.Megaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromMicroohms(double microohms) => new ElectricImpedance(microohms, ElectricImpedanceUnit.Microohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromMilliohms(double milliohms) => new ElectricImpedance(milliohms, ElectricImpedanceUnit.Milliohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromNanoohms(double nanoohms) => new ElectricImpedance(nanoohms, ElectricImpedanceUnit.Nanoohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromOhms(double ohms) => new ElectricImpedance(ohms, ElectricImpedanceUnit.Ohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricImpedance FromTeraohms(double teraohms) => new ElectricImpedance(teraohms, ElectricImpedanceUnit.Teraohm);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricImpedance unit value.
+ public static ElectricImpedance From(double value, ElectricImpedanceUnit fromUnit)
+ {
+ return new ElectricImpedance(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricImpedanceUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricImpedance to another ElectricImpedance with the unit representation .
+ ///
+ /// A ElectricImpedance with the specified unit.
+ public ElectricImpedance ToUnit(ElectricImpedanceUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricImpedance(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricImpedanceUnit.Gigaohm => (_value) * 1e9d,
+ ElectricImpedanceUnit.Kiloohm => (_value) * 1e3d,
+ ElectricImpedanceUnit.Megaohm => (_value) * 1e6d,
+ ElectricImpedanceUnit.Microohm => (_value) * 1e-6d,
+ ElectricImpedanceUnit.Milliohm => (_value) * 1e-3d,
+ ElectricImpedanceUnit.Nanoohm => (_value) * 1e-9d,
+ ElectricImpedanceUnit.Ohm => _value,
+ ElectricImpedanceUnit.Teraohm => (_value) * 1e12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricImpedanceUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricImpedanceUnit.Gigaohm => (baseUnitValue) / 1e9d,
+ ElectricImpedanceUnit.Kiloohm => (baseUnitValue) / 1e3d,
+ ElectricImpedanceUnit.Megaohm => (baseUnitValue) / 1e6d,
+ ElectricImpedanceUnit.Microohm => (baseUnitValue) / 1e-6d,
+ ElectricImpedanceUnit.Milliohm => (baseUnitValue) / 1e-3d,
+ ElectricImpedanceUnit.Nanoohm => (baseUnitValue) / 1e-9d,
+ ElectricImpedanceUnit.Ohm => baseUnitValue,
+ ElectricImpedanceUnit.Teraohm => (baseUnitValue) / 1e12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs
index b69ae01f76..d42d6c732f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs
@@ -26,6 +26,9 @@ namespace UnitsNet
///
/// In classical electromagnetism, the electric potential (a scalar quantity denoted by Φ, ΦE or V and also called the electric field potential or the electrostatic potential) at a point is the amount of electric potential energy that a unitary point charge would have when located at that point.
///
+ ///
+ /// If you want to map more parameters into the class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.
+ ///
public struct ElectricPotential
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
index 5ade7c64a4..0a2885533c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
@@ -26,6 +26,10 @@ namespace UnitsNet
///
/// The Electric Potential of a system known to use Alternating Current.
///
+ ///
+ /// has been merged into , and will be removed in a later major version. If you want to map more parameters into the class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.
+ ///
+ [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public struct ElectricPotentialAc
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
index 1e67536b47..0fc2fcadd5 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
@@ -26,6 +26,10 @@ namespace UnitsNet
///
/// The Electric Potential of a system known to use Direct Current.
///
+ ///
+ /// has been merged into , and will be removed in a later major version. If you want to map more parameters into the class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.
+ ///
+ [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public struct ElectricPotentialDc
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs
new file mode 100644
index 0000000000..e68da14a46
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs
@@ -0,0 +1,253 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// In electrical circuits, reactance is the opposition presented to alternating current by inductance and capacitance. Along with resistance, it is one of two elements of impedance.
+ ///
+ ///
+ /// https://en.wikipedia.org/wiki/Electrical_reactance
+ ///
+ public struct ElectricReactance
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricReactanceUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricReactanceUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricReactance(double value, ElectricReactanceUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricReactance, which is Second. All conversions go via this value.
+ ///
+ public static ElectricReactanceUnit BaseUnit { get; } = ElectricReactanceUnit.Ohm;
+
+ ///
+ /// Represents the largest possible value of ElectricReactance.
+ ///
+ public static ElectricReactance MaxValue { get; } = new ElectricReactance(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricReactance.
+ ///
+ public static ElectricReactance MinValue { get; } = new ElectricReactance(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricReactance Zero { get; } = new ElectricReactance(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigaohms => As(ElectricReactanceUnit.Gigaohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kiloohms => As(ElectricReactanceUnit.Kiloohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megaohms => As(ElectricReactanceUnit.Megaohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Microohms => As(ElectricReactanceUnit.Microohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Milliohms => As(ElectricReactanceUnit.Milliohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanoohms => As(ElectricReactanceUnit.Nanoohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Ohms => As(ElectricReactanceUnit.Ohm);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Teraohms => As(ElectricReactanceUnit.Teraohm);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromGigaohms(double gigaohms) => new ElectricReactance(gigaohms, ElectricReactanceUnit.Gigaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromKiloohms(double kiloohms) => new ElectricReactance(kiloohms, ElectricReactanceUnit.Kiloohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromMegaohms(double megaohms) => new ElectricReactance(megaohms, ElectricReactanceUnit.Megaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromMicroohms(double microohms) => new ElectricReactance(microohms, ElectricReactanceUnit.Microohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromMilliohms(double milliohms) => new ElectricReactance(milliohms, ElectricReactanceUnit.Milliohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromNanoohms(double nanoohms) => new ElectricReactance(nanoohms, ElectricReactanceUnit.Nanoohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromOhms(double ohms) => new ElectricReactance(ohms, ElectricReactanceUnit.Ohm);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactance FromTeraohms(double teraohms) => new ElectricReactance(teraohms, ElectricReactanceUnit.Teraohm);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricReactance unit value.
+ public static ElectricReactance From(double value, ElectricReactanceUnit fromUnit)
+ {
+ return new ElectricReactance(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricReactanceUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricReactance to another ElectricReactance with the unit representation .
+ ///
+ /// A ElectricReactance with the specified unit.
+ public ElectricReactance ToUnit(ElectricReactanceUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricReactance(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricReactanceUnit.Gigaohm => (_value) * 1e9d,
+ ElectricReactanceUnit.Kiloohm => (_value) * 1e3d,
+ ElectricReactanceUnit.Megaohm => (_value) * 1e6d,
+ ElectricReactanceUnit.Microohm => (_value) * 1e-6d,
+ ElectricReactanceUnit.Milliohm => (_value) * 1e-3d,
+ ElectricReactanceUnit.Nanoohm => (_value) * 1e-9d,
+ ElectricReactanceUnit.Ohm => _value,
+ ElectricReactanceUnit.Teraohm => (_value) * 1e12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricReactanceUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricReactanceUnit.Gigaohm => (baseUnitValue) / 1e9d,
+ ElectricReactanceUnit.Kiloohm => (baseUnitValue) / 1e3d,
+ ElectricReactanceUnit.Megaohm => (baseUnitValue) / 1e6d,
+ ElectricReactanceUnit.Microohm => (baseUnitValue) / 1e-6d,
+ ElectricReactanceUnit.Milliohm => (baseUnitValue) / 1e-3d,
+ ElectricReactanceUnit.Nanoohm => (baseUnitValue) / 1e-9d,
+ ElectricReactanceUnit.Ohm => baseUnitValue,
+ ElectricReactanceUnit.Teraohm => (baseUnitValue) / 1e12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs
new file mode 100644
index 0000000000..c4b2217c00
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs
@@ -0,0 +1,185 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// The volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour.
+ ///
+ public struct ElectricReactiveEnergy
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricReactiveEnergyUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricReactiveEnergyUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricReactiveEnergy(double value, ElectricReactiveEnergyUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricReactiveEnergy, which is Second. All conversions go via this value.
+ ///
+ public static ElectricReactiveEnergyUnit BaseUnit { get; } = ElectricReactiveEnergyUnit.VoltampereReactiveHour;
+
+ ///
+ /// Represents the largest possible value of ElectricReactiveEnergy.
+ ///
+ public static ElectricReactiveEnergy MaxValue { get; } = new ElectricReactiveEnergy(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricReactiveEnergy.
+ ///
+ public static ElectricReactiveEnergy MinValue { get; } = new ElectricReactiveEnergy(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricReactiveEnergy Zero { get; } = new ElectricReactiveEnergy(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double KilovoltampereReactiveHours => As(ElectricReactiveEnergyUnit.KilovoltampereReactiveHour);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double MegavoltampereReactiveHours => As(ElectricReactiveEnergyUnit.MegavoltampereReactiveHour);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double VoltampereReactiveHours => As(ElectricReactiveEnergyUnit.VoltampereReactiveHour);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactiveEnergy FromKilovoltampereReactiveHours(double kilovoltamperereactivehours) => new ElectricReactiveEnergy(kilovoltamperereactivehours, ElectricReactiveEnergyUnit.KilovoltampereReactiveHour);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactiveEnergy FromMegavoltampereReactiveHours(double megavoltamperereactivehours) => new ElectricReactiveEnergy(megavoltamperereactivehours, ElectricReactiveEnergyUnit.MegavoltampereReactiveHour);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactiveEnergy FromVoltampereReactiveHours(double voltamperereactivehours) => new ElectricReactiveEnergy(voltamperereactivehours, ElectricReactiveEnergyUnit.VoltampereReactiveHour);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricReactiveEnergy unit value.
+ public static ElectricReactiveEnergy From(double value, ElectricReactiveEnergyUnit fromUnit)
+ {
+ return new ElectricReactiveEnergy(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricReactiveEnergyUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricReactiveEnergy to another ElectricReactiveEnergy with the unit representation .
+ ///
+ /// A ElectricReactiveEnergy with the specified unit.
+ public ElectricReactiveEnergy ToUnit(ElectricReactiveEnergyUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricReactiveEnergy(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricReactiveEnergyUnit.KilovoltampereReactiveHour => (_value) * 1e3d,
+ ElectricReactiveEnergyUnit.MegavoltampereReactiveHour => (_value) * 1e6d,
+ ElectricReactiveEnergyUnit.VoltampereReactiveHour => _value,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricReactiveEnergyUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricReactiveEnergyUnit.KilovoltampereReactiveHour => (baseUnitValue) / 1e3d,
+ ElectricReactiveEnergyUnit.MegavoltampereReactiveHour => (baseUnitValue) / 1e6d,
+ ElectricReactiveEnergyUnit.VoltampereReactiveHour => baseUnitValue,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs
new file mode 100644
index 0000000000..ebf8edb732
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs
@@ -0,0 +1,201 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// In electric power transmission and distribution, volt-ampere reactive (var) is a unit of measurement of reactive power. Reactive power exists in an AC circuit when the current and voltage are not in phase.
+ ///
+ ///
+ /// https://en.wikipedia.org/wiki/AC_power#Active,_reactive,_apparent,_and_complex_power_in_sinusoidal_steady-state
+ ///
+ public struct ElectricReactivePower
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricReactivePowerUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricReactivePowerUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricReactivePower(double value, ElectricReactivePowerUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricReactivePower, which is Second. All conversions go via this value.
+ ///
+ public static ElectricReactivePowerUnit BaseUnit { get; } = ElectricReactivePowerUnit.VoltampereReactive;
+
+ ///
+ /// Represents the largest possible value of ElectricReactivePower.
+ ///
+ public static ElectricReactivePower MaxValue { get; } = new ElectricReactivePower(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricReactivePower.
+ ///
+ public static ElectricReactivePower MinValue { get; } = new ElectricReactivePower(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricReactivePower Zero { get; } = new ElectricReactivePower(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double GigavoltamperesReactive => As(ElectricReactivePowerUnit.GigavoltampereReactive);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double KilovoltamperesReactive => As(ElectricReactivePowerUnit.KilovoltampereReactive);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double MegavoltamperesReactive => As(ElectricReactivePowerUnit.MegavoltampereReactive);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double VoltamperesReactive => As(ElectricReactivePowerUnit.VoltampereReactive);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactivePower FromGigavoltamperesReactive(double gigavoltamperesreactive) => new ElectricReactivePower(gigavoltamperesreactive, ElectricReactivePowerUnit.GigavoltampereReactive);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactivePower FromKilovoltamperesReactive(double kilovoltamperesreactive) => new ElectricReactivePower(kilovoltamperesreactive, ElectricReactivePowerUnit.KilovoltampereReactive);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactivePower FromMegavoltamperesReactive(double megavoltamperesreactive) => new ElectricReactivePower(megavoltamperesreactive, ElectricReactivePowerUnit.MegavoltampereReactive);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricReactivePower FromVoltamperesReactive(double voltamperesreactive) => new ElectricReactivePower(voltamperesreactive, ElectricReactivePowerUnit.VoltampereReactive);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricReactivePower unit value.
+ public static ElectricReactivePower From(double value, ElectricReactivePowerUnit fromUnit)
+ {
+ return new ElectricReactivePower(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricReactivePowerUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricReactivePower to another ElectricReactivePower with the unit representation .
+ ///
+ /// A ElectricReactivePower with the specified unit.
+ public ElectricReactivePower ToUnit(ElectricReactivePowerUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricReactivePower(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricReactivePowerUnit.GigavoltampereReactive => (_value) * 1e9d,
+ ElectricReactivePowerUnit.KilovoltampereReactive => (_value) * 1e3d,
+ ElectricReactivePowerUnit.MegavoltampereReactive => (_value) * 1e6d,
+ ElectricReactivePowerUnit.VoltampereReactive => _value,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricReactivePowerUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricReactivePowerUnit.GigavoltampereReactive => (baseUnitValue) / 1e9d,
+ ElectricReactivePowerUnit.KilovoltampereReactive => (baseUnitValue) / 1e3d,
+ ElectricReactivePowerUnit.MegavoltampereReactive => (baseUnitValue) / 1e6d,
+ ElectricReactivePowerUnit.VoltampereReactive => baseUnitValue,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs
index 21ed738a99..36b793e6e3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs
@@ -24,8 +24,11 @@ namespace UnitsNet
{
///
///
- /// The electrical resistance of an electrical conductor is the opposition to the passage of an electric current through that conductor.
+ /// The electrical resistance of an object is a measure of its opposition to the flow of electric current. Along with reactance, it is one of two elements of impedance. Its reciprocal quantity is electrical conductance.
///
+ ///
+ /// https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance
+ ///
public struct ElectricResistance
{
///
@@ -104,6 +107,11 @@ public ElectricResistance(double value, ElectricResistanceUnit unit)
///
public double Milliohms => As(ElectricResistanceUnit.Milliohm);
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanoohms => As(ElectricResistanceUnit.Nanoohm);
+
///
/// Gets a value of this quantity converted into
///
@@ -148,6 +156,12 @@ public ElectricResistance(double value, ElectricResistanceUnit unit)
/// If value is NaN or Infinity.
public static ElectricResistance FromMilliohms(double milliohms) => new ElectricResistance(milliohms, ElectricResistanceUnit.Milliohm);
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricResistance FromNanoohms(double nanoohms) => new ElectricResistance(nanoohms, ElectricResistanceUnit.Nanoohm);
+
///
/// Creates a from .
///
@@ -205,6 +219,7 @@ private double GetValueInBaseUnit()
ElectricResistanceUnit.Megaohm => (_value) * 1e6d,
ElectricResistanceUnit.Microohm => (_value) * 1e-6d,
ElectricResistanceUnit.Milliohm => (_value) * 1e-3d,
+ ElectricResistanceUnit.Nanoohm => (_value) * 1e-9d,
ElectricResistanceUnit.Ohm => _value,
ElectricResistanceUnit.Teraohm => (_value) * 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -225,6 +240,7 @@ private double GetValueAs(ElectricResistanceUnit unit)
ElectricResistanceUnit.Megaohm => (baseUnitValue) / 1e6d,
ElectricResistanceUnit.Microohm => (baseUnitValue) / 1e-6d,
ElectricResistanceUnit.Milliohm => (baseUnitValue) / 1e-3d,
+ ElectricResistanceUnit.Nanoohm => (baseUnitValue) / 1e-9d,
ElectricResistanceUnit.Ohm => baseUnitValue,
ElectricResistanceUnit.Teraohm => (baseUnitValue) / 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs
new file mode 100644
index 0000000000..cd2af42a41
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs
@@ -0,0 +1,357 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// Electrical susceptance is the imaginary part of admittance, where the real part is conductance.
+ ///
+ ///
+ /// https://en.wikipedia.org/wiki/Electrical_susceptance
+ ///
+ public struct ElectricSusceptance
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ElectricSusceptanceUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ElectricSusceptanceUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public ElectricSusceptance(double value, ElectricSusceptanceUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ElectricSusceptance, which is Second. All conversions go via this value.
+ ///
+ public static ElectricSusceptanceUnit BaseUnit { get; } = ElectricSusceptanceUnit.Siemens;
+
+ ///
+ /// Represents the largest possible value of ElectricSusceptance.
+ ///
+ public static ElectricSusceptance MaxValue { get; } = new ElectricSusceptance(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ElectricSusceptance.
+ ///
+ public static ElectricSusceptance MinValue { get; } = new ElectricSusceptance(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ElectricSusceptance Zero { get; } = new ElectricSusceptance(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigamhos => As(ElectricSusceptanceUnit.Gigamho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Gigasiemens => As(ElectricSusceptanceUnit.Gigasiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kilomhos => As(ElectricSusceptanceUnit.Kilomho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Kilosiemens => As(ElectricSusceptanceUnit.Kilosiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megamhos => As(ElectricSusceptanceUnit.Megamho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Megasiemens => As(ElectricSusceptanceUnit.Megasiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Mhos => As(ElectricSusceptanceUnit.Mho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Micromhos => As(ElectricSusceptanceUnit.Micromho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Microsiemens => As(ElectricSusceptanceUnit.Microsiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Millimhos => As(ElectricSusceptanceUnit.Millimho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Millisiemens => As(ElectricSusceptanceUnit.Millisiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanomhos => As(ElectricSusceptanceUnit.Nanomho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Nanosiemens => As(ElectricSusceptanceUnit.Nanosiemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Siemens => As(ElectricSusceptanceUnit.Siemens);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Teramhos => As(ElectricSusceptanceUnit.Teramho);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Terasiemens => As(ElectricSusceptanceUnit.Terasiemens);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromGigamhos(double gigamhos) => new ElectricSusceptance(gigamhos, ElectricSusceptanceUnit.Gigamho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromGigasiemens(double gigasiemens) => new ElectricSusceptance(gigasiemens, ElectricSusceptanceUnit.Gigasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromKilomhos(double kilomhos) => new ElectricSusceptance(kilomhos, ElectricSusceptanceUnit.Kilomho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromKilosiemens(double kilosiemens) => new ElectricSusceptance(kilosiemens, ElectricSusceptanceUnit.Kilosiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromMegamhos(double megamhos) => new ElectricSusceptance(megamhos, ElectricSusceptanceUnit.Megamho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromMegasiemens(double megasiemens) => new ElectricSusceptance(megasiemens, ElectricSusceptanceUnit.Megasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromMhos(double mhos) => new ElectricSusceptance(mhos, ElectricSusceptanceUnit.Mho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromMicromhos(double micromhos) => new ElectricSusceptance(micromhos, ElectricSusceptanceUnit.Micromho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromMicrosiemens(double microsiemens) => new ElectricSusceptance(microsiemens, ElectricSusceptanceUnit.Microsiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromMillimhos(double millimhos) => new ElectricSusceptance(millimhos, ElectricSusceptanceUnit.Millimho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromMillisiemens(double millisiemens) => new ElectricSusceptance(millisiemens, ElectricSusceptanceUnit.Millisiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromNanomhos(double nanomhos) => new ElectricSusceptance(nanomhos, ElectricSusceptanceUnit.Nanomho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromNanosiemens(double nanosiemens) => new ElectricSusceptance(nanosiemens, ElectricSusceptanceUnit.Nanosiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromSiemens(double siemens) => new ElectricSusceptance(siemens, ElectricSusceptanceUnit.Siemens);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromTeramhos(double teramhos) => new ElectricSusceptance(teramhos, ElectricSusceptanceUnit.Teramho);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static ElectricSusceptance FromTerasiemens(double terasiemens) => new ElectricSusceptance(terasiemens, ElectricSusceptanceUnit.Terasiemens);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ElectricSusceptance unit value.
+ public static ElectricSusceptance From(double value, ElectricSusceptanceUnit fromUnit)
+ {
+ return new ElectricSusceptance(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ElectricSusceptanceUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ElectricSusceptance to another ElectricSusceptance with the unit representation .
+ ///
+ /// A ElectricSusceptance with the specified unit.
+ public ElectricSusceptance ToUnit(ElectricSusceptanceUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ElectricSusceptance(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ElectricSusceptanceUnit.Gigamho => (_value) * 1e9d,
+ ElectricSusceptanceUnit.Gigasiemens => (_value) * 1e9d,
+ ElectricSusceptanceUnit.Kilomho => (_value) * 1e3d,
+ ElectricSusceptanceUnit.Kilosiemens => (_value) * 1e3d,
+ ElectricSusceptanceUnit.Megamho => (_value) * 1e6d,
+ ElectricSusceptanceUnit.Megasiemens => (_value) * 1e6d,
+ ElectricSusceptanceUnit.Mho => _value,
+ ElectricSusceptanceUnit.Micromho => (_value) * 1e-6d,
+ ElectricSusceptanceUnit.Microsiemens => (_value) * 1e-6d,
+ ElectricSusceptanceUnit.Millimho => (_value) * 1e-3d,
+ ElectricSusceptanceUnit.Millisiemens => (_value) * 1e-3d,
+ ElectricSusceptanceUnit.Nanomho => (_value) * 1e-9d,
+ ElectricSusceptanceUnit.Nanosiemens => (_value) * 1e-9d,
+ ElectricSusceptanceUnit.Siemens => _value,
+ ElectricSusceptanceUnit.Teramho => (_value) * 1e12d,
+ ElectricSusceptanceUnit.Terasiemens => (_value) * 1e12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ElectricSusceptanceUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ElectricSusceptanceUnit.Gigamho => (baseUnitValue) / 1e9d,
+ ElectricSusceptanceUnit.Gigasiemens => (baseUnitValue) / 1e9d,
+ ElectricSusceptanceUnit.Kilomho => (baseUnitValue) / 1e3d,
+ ElectricSusceptanceUnit.Kilosiemens => (baseUnitValue) / 1e3d,
+ ElectricSusceptanceUnit.Megamho => (baseUnitValue) / 1e6d,
+ ElectricSusceptanceUnit.Megasiemens => (baseUnitValue) / 1e6d,
+ ElectricSusceptanceUnit.Mho => baseUnitValue,
+ ElectricSusceptanceUnit.Micromho => (baseUnitValue) / 1e-6d,
+ ElectricSusceptanceUnit.Microsiemens => (baseUnitValue) / 1e-6d,
+ ElectricSusceptanceUnit.Millimho => (baseUnitValue) / 1e-3d,
+ ElectricSusceptanceUnit.Millisiemens => (baseUnitValue) / 1e-3d,
+ ElectricSusceptanceUnit.Nanomho => (baseUnitValue) / 1e-9d,
+ ElectricSusceptanceUnit.Nanosiemens => (baseUnitValue) / 1e-9d,
+ ElectricSusceptanceUnit.Siemens => baseUnitValue,
+ ElectricSusceptanceUnit.Teramho => (baseUnitValue) / 1e12d,
+ ElectricSusceptanceUnit.Terasiemens => (baseUnitValue) / 1e12d,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactiveEnergy.g.cs
index 2e4f72337f..36b6e795e7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactiveEnergy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactiveEnergy.g.cs
@@ -26,6 +26,10 @@ namespace UnitsNet
///
/// The Volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour.
///
+ ///
+ /// has been renamed to , and will be removed in a later major version.
+ ///
+ [Obsolete("ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.")]
public struct ReactiveEnergy
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactivePower.g.cs
index ec11ab73e7..29dd5b7e1c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactivePower.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactivePower.g.cs
@@ -26,6 +26,10 @@ namespace UnitsNet
///
/// Volt-ampere reactive (var) is a unit by which reactive power is expressed in an AC electric power system. Reactive power exists in an AC circuit when the current and voltage are not in phase.
///
+ ///
+ /// has been renamed to , and will be removed in a later major version.
+ ///
+ [Obsolete("ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.")]
public struct ReactivePower
{
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricAdmittanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricAdmittanceUnit.g.cs
index 622b45de43..8399e233bc 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricAdmittanceUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricAdmittanceUnit.g.cs
@@ -25,10 +25,22 @@ namespace UnitsNet.Units
public enum ElectricAdmittanceUnit
{
+ Gigamho = 16,
+ Gigasiemens = 19,
+ Kilomho = 8,
+ Kilosiemens = 14,
+ Megamho = 10,
+ Megasiemens = 13,
+ Mho = 7,
+ Micromho = 12,
Microsiemens = 1,
+ Millimho = 5,
Millisiemens = 2,
+ Nanomho = 6,
Nanosiemens = 3,
Siemens = 4,
+ Teramho = 15,
+ Terasiemens = 9,
}
#pragma warning restore 1591
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricApparentEnergyUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricApparentEnergyUnit.g.cs
new file mode 100644
index 0000000000..85d21e152a
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricApparentEnergyUnit.g.cs
@@ -0,0 +1,34 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricApparentEnergyUnit
+ {
+ KilovoltampereHour = 7,
+ MegavoltampereHour = 3,
+ VoltampereHour = 10,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricApparentPowerUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricApparentPowerUnit.g.cs
new file mode 100644
index 0000000000..fc85f4fa98
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricApparentPowerUnit.g.cs
@@ -0,0 +1,37 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricApparentPowerUnit
+ {
+ Gigavoltampere = 3,
+ Kilovoltampere = 1,
+ Megavoltampere = 2,
+ Microvoltampere = 10,
+ Millivoltampere = 6,
+ Voltampere = 9,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricCapacitanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricCapacitanceUnit.g.cs
new file mode 100644
index 0000000000..da5499b11d
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricCapacitanceUnit.g.cs
@@ -0,0 +1,38 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricCapacitanceUnit
+ {
+ Farad = 3,
+ Kilofarad = 8,
+ Megafarad = 1,
+ Microfarad = 7,
+ Millifarad = 5,
+ Nanofarad = 4,
+ Picofarad = 10,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductanceUnit.g.cs
index f2003b8384..06708cf596 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductanceUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductanceUnit.g.cs
@@ -25,11 +25,22 @@ namespace UnitsNet.Units
public enum ElectricConductanceUnit
{
+ Gigamho = 7,
+ Gigasiemens = 18,
+ Kilomho = 15,
Kilosiemens = 6,
+ Megamho = 8,
+ Megasiemens = 17,
+ Mho = 12,
+ Micromho = 5,
Microsiemens = 1,
+ Millimho = 9,
Millisiemens = 2,
+ Nanomho = 14,
Nanosiemens = 10,
Siemens = 3,
+ Teramho = 19,
+ Terasiemens = 16,
}
#pragma warning restore 1591
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricImpedanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricImpedanceUnit.g.cs
new file mode 100644
index 0000000000..f4a01427b7
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricImpedanceUnit.g.cs
@@ -0,0 +1,39 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricImpedanceUnit
+ {
+ Gigaohm = 4,
+ Kiloohm = 3,
+ Megaohm = 10,
+ Microohm = 8,
+ Milliohm = 9,
+ Nanoohm = 7,
+ Ohm = 6,
+ Teraohm = 5,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactanceUnit.g.cs
new file mode 100644
index 0000000000..2f060e90b4
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactanceUnit.g.cs
@@ -0,0 +1,39 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricReactanceUnit
+ {
+ Gigaohm = 5,
+ Kiloohm = 8,
+ Megaohm = 1,
+ Microohm = 9,
+ Milliohm = 4,
+ Nanoohm = 13,
+ Ohm = 6,
+ Teraohm = 2,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactiveEnergyUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactiveEnergyUnit.g.cs
new file mode 100644
index 0000000000..4acffa954b
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactiveEnergyUnit.g.cs
@@ -0,0 +1,34 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricReactiveEnergyUnit
+ {
+ KilovoltampereReactiveHour = 10,
+ MegavoltampereReactiveHour = 4,
+ VoltampereReactiveHour = 7,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactivePowerUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactivePowerUnit.g.cs
new file mode 100644
index 0000000000..e905d95887
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricReactivePowerUnit.g.cs
@@ -0,0 +1,35 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricReactivePowerUnit
+ {
+ GigavoltampereReactive = 1,
+ KilovoltampereReactive = 2,
+ MegavoltampereReactive = 8,
+ VoltampereReactive = 7,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistanceUnit.g.cs
index 452a17522a..0b27324d86 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistanceUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistanceUnit.g.cs
@@ -30,6 +30,7 @@ public enum ElectricResistanceUnit
Megaohm = 3,
Microohm = 4,
Milliohm = 5,
+ Nanoohm = 11,
Ohm = 6,
Teraohm = 12,
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricSusceptanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricSusceptanceUnit.g.cs
new file mode 100644
index 0000000000..02be9d8e07
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricSusceptanceUnit.g.cs
@@ -0,0 +1,47 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Units
+{
+ // Disable missing XML comment warnings for the generated unit enums.
+ #pragma warning disable 1591
+
+ public enum ElectricSusceptanceUnit
+ {
+ Gigamho = 16,
+ Gigasiemens = 15,
+ Kilomho = 8,
+ Kilosiemens = 4,
+ Megamho = 12,
+ Megasiemens = 19,
+ Mho = 7,
+ Micromho = 9,
+ Microsiemens = 10,
+ Millimho = 3,
+ Millisiemens = 6,
+ Nanomho = 5,
+ Nanosiemens = 1,
+ Siemens = 2,
+ Teramho = 20,
+ Terasiemens = 14,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
index fb7e684fce..686fcf0b76 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
+++ b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
@@ -42,6 +42,12 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "DynamicViscosity", "Dynamic
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricAdmittance", "ElectricAdmittance\ElectricAdmittance.nfproj", "{2ee55c63-d077-25dd-f076-857adfe08080}"
EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricApparentEnergy", "ElectricApparentEnergy\ElectricApparentEnergy.nfproj", "{f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}"
+EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricApparentPower", "ElectricApparentPower\ElectricApparentPower.nfproj", "{b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}"
+EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricCapacitance", "ElectricCapacitance\ElectricCapacitance.nfproj", "{10e8cf6b-7fec-911f-770d-e3641296ac89}"
+EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricCharge", "ElectricCharge\ElectricCharge.nfproj", "{f4286cfc-484b-8466-8efa-1111696babb9}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricChargeDensity", "ElectricChargeDensity\ElectricChargeDensity.nfproj", "{b1567c85-ad77-c283-9165-777ad0e9a2eb}"
@@ -58,6 +64,8 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricCurrentGradient", "
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricField", "ElectricField\ElectricField.nfproj", "{635581a6-f954-d0e4-9c68-02c1725e49d2}"
EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricImpedance", "ElectricImpedance\ElectricImpedance.nfproj", "{23a79010-5c1a-9120-0992-a69c8dd80015}"
+EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricInductance", "ElectricInductance\ElectricInductance.nfproj", "{76bf8a97-e573-a5b5-286f-04ca7e00f8e9}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricPotential", "ElectricPotential\ElectricPotential.nfproj", "{66c94dc2-e546-9737-a45b-4bc60fe0e536}"
@@ -68,12 +76,20 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricPotentialChangeRate
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricPotentialDc", "ElectricPotentialDc\ElectricPotentialDc.nfproj", "{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}"
EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricReactance", "ElectricReactance\ElectricReactance.nfproj", "{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}"
+EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricReactiveEnergy", "ElectricReactiveEnergy\ElectricReactiveEnergy.nfproj", "{9f892c4e-26c2-1420-a73c-08138c8f6ca2}"
+EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricReactivePower", "ElectricReactivePower\ElectricReactivePower.nfproj", "{6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}"
+EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricResistance", "ElectricResistance\ElectricResistance.nfproj", "{78d59e90-3339-54d6-3803-f68623b72eff}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricResistivity", "ElectricResistivity\ElectricResistivity.nfproj", "{6a4a0f45-c2b4-6be4-e44a-e78d3282359f}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricSurfaceChargeDensity", "ElectricSurfaceChargeDensity\ElectricSurfaceChargeDensity.nfproj", "{006e161d-aae1-2dd1-5b94-ebd45d31f50a}"
EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricSusceptance", "ElectricSusceptance\ElectricSusceptance.nfproj", "{544c006b-f7de-21a9-a1b4-8df710e184c8}"
+EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Energy", "Energy\Energy.nfproj", "{f7d3fcf2-cadc-19dd-4c4c-5a54a5102c95}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "EnergyDensity", "EnergyDensity\EnergyDensity.nfproj", "{c5025916-5039-97c2-b450-af1420f5fb08}"
@@ -380,6 +396,24 @@ Global
{2ee55c63-d077-25dd-f076-857adfe08080}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ee55c63-d077-25dd-f076-857adfe08080}.Release|Any CPU.Build.0 = Release|Any CPU
{2ee55c63-d077-25dd-f076-857adfe08080}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}.Release|Any CPU.Build.0 = Release|Any CPU
+{f22b7bcc-5a8d-3a02-d81c-caf6c9c44d61}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}.Release|Any CPU.Build.0 = Release|Any CPU
+{b7a9eb2a-4b0e-548c-2370-a33ee63b21cc}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{10e8cf6b-7fec-911f-770d-e3641296ac89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{10e8cf6b-7fec-911f-770d-e3641296ac89}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{10e8cf6b-7fec-911f-770d-e3641296ac89}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{10e8cf6b-7fec-911f-770d-e3641296ac89}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{10e8cf6b-7fec-911f-770d-e3641296ac89}.Release|Any CPU.Build.0 = Release|Any CPU
+{10e8cf6b-7fec-911f-770d-e3641296ac89}.Release|Any CPU.Deploy.0 = Release|Any CPU
{f4286cfc-484b-8466-8efa-1111696babb9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f4286cfc-484b-8466-8efa-1111696babb9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f4286cfc-484b-8466-8efa-1111696babb9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -428,6 +462,12 @@ Global
{635581a6-f954-d0e4-9c68-02c1725e49d2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{635581a6-f954-d0e4-9c68-02c1725e49d2}.Release|Any CPU.Build.0 = Release|Any CPU
{635581a6-f954-d0e4-9c68-02c1725e49d2}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{23a79010-5c1a-9120-0992-a69c8dd80015}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{23a79010-5c1a-9120-0992-a69c8dd80015}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{23a79010-5c1a-9120-0992-a69c8dd80015}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{23a79010-5c1a-9120-0992-a69c8dd80015}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{23a79010-5c1a-9120-0992-a69c8dd80015}.Release|Any CPU.Build.0 = Release|Any CPU
+{23a79010-5c1a-9120-0992-a69c8dd80015}.Release|Any CPU.Deploy.0 = Release|Any CPU
{76bf8a97-e573-a5b5-286f-04ca7e00f8e9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76bf8a97-e573-a5b5-286f-04ca7e00f8e9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76bf8a97-e573-a5b5-286f-04ca7e00f8e9}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -458,6 +498,24 @@ Global
{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Release|Any CPU.Build.0 = Release|Any CPU
{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Release|Any CPU.Build.0 = Release|Any CPU
+{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{9f892c4e-26c2-1420-a73c-08138c8f6ca2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{9f892c4e-26c2-1420-a73c-08138c8f6ca2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{9f892c4e-26c2-1420-a73c-08138c8f6ca2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{9f892c4e-26c2-1420-a73c-08138c8f6ca2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{9f892c4e-26c2-1420-a73c-08138c8f6ca2}.Release|Any CPU.Build.0 = Release|Any CPU
+{9f892c4e-26c2-1420-a73c-08138c8f6ca2}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}.Release|Any CPU.Build.0 = Release|Any CPU
+{6e5b2ba2-7712-0f4f-d2bf-2624bb877dbe}.Release|Any CPU.Deploy.0 = Release|Any CPU
{78d59e90-3339-54d6-3803-f68623b72eff}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78d59e90-3339-54d6-3803-f68623b72eff}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78d59e90-3339-54d6-3803-f68623b72eff}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -476,6 +534,12 @@ Global
{006e161d-aae1-2dd1-5b94-ebd45d31f50a}.Release|Any CPU.ActiveCfg = Release|Any CPU
{006e161d-aae1-2dd1-5b94-ebd45d31f50a}.Release|Any CPU.Build.0 = Release|Any CPU
{006e161d-aae1-2dd1-5b94-ebd45d31f50a}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{544c006b-f7de-21a9-a1b4-8df710e184c8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{544c006b-f7de-21a9-a1b4-8df710e184c8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{544c006b-f7de-21a9-a1b4-8df710e184c8}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{544c006b-f7de-21a9-a1b4-8df710e184c8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{544c006b-f7de-21a9-a1b4-8df710e184c8}.Release|Any CPU.Build.0 = Release|Any CPU
+{544c006b-f7de-21a9-a1b4-8df710e184c8}.Release|Any CPU.Deploy.0 = Release|Any CPU
{f7d3fcf2-cadc-19dd-4c4c-5a54a5102c95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f7d3fcf2-cadc-19dd-4c4c-5a54a5102c95}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f7d3fcf2-cadc-19dd-4c4c-5a54a5102c95}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricAdmittanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricAdmittanceExtensionsTest.g.cs
index 6cb2e25259..a27e4d458d 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricAdmittanceExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricAdmittanceExtensionsTest.g.cs
@@ -24,14 +24,54 @@ namespace UnitsNet.Tests
{
public class NumberToElectricAdmittanceExtensionsTests
{
+ [Fact]
+ public void NumberToGigamhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromGigamhos(2), 2.Gigamhos());
+
+ [Fact]
+ public void NumberToGigasiemensTest() =>
+ Assert.Equal(ElectricAdmittance.FromGigasiemens(2), 2.Gigasiemens());
+
+ [Fact]
+ public void NumberToKilomhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromKilomhos(2), 2.Kilomhos());
+
+ [Fact]
+ public void NumberToKilosiemensTest() =>
+ Assert.Equal(ElectricAdmittance.FromKilosiemens(2), 2.Kilosiemens());
+
+ [Fact]
+ public void NumberToMegamhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromMegamhos(2), 2.Megamhos());
+
+ [Fact]
+ public void NumberToMegasiemensTest() =>
+ Assert.Equal(ElectricAdmittance.FromMegasiemens(2), 2.Megasiemens());
+
+ [Fact]
+ public void NumberToMhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromMhos(2), 2.Mhos());
+
+ [Fact]
+ public void NumberToMicromhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromMicromhos(2), 2.Micromhos());
+
[Fact]
public void NumberToMicrosiemensTest() =>
Assert.Equal(ElectricAdmittance.FromMicrosiemens(2), 2.Microsiemens());
+ [Fact]
+ public void NumberToMillimhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromMillimhos(2), 2.Millimhos());
+
[Fact]
public void NumberToMillisiemensTest() =>
Assert.Equal(ElectricAdmittance.FromMillisiemens(2), 2.Millisiemens());
+ [Fact]
+ public void NumberToNanomhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromNanomhos(2), 2.Nanomhos());
+
[Fact]
public void NumberToNanosiemensTest() =>
Assert.Equal(ElectricAdmittance.FromNanosiemens(2), 2.Nanosiemens());
@@ -40,5 +80,13 @@ public void NumberToNanosiemensTest() =>
public void NumberToSiemensTest() =>
Assert.Equal(ElectricAdmittance.FromSiemens(2), 2.Siemens());
+ [Fact]
+ public void NumberToTeramhosTest() =>
+ Assert.Equal(ElectricAdmittance.FromTeramhos(2), 2.Teramhos());
+
+ [Fact]
+ public void NumberToTerasiemensTest() =>
+ Assert.Equal(ElectricAdmittance.FromTerasiemens(2), 2.Terasiemens());
+
}
}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricApparentEnergyExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricApparentEnergyExtensionsTest.g.cs
new file mode 100644
index 0000000000..af5bc914b7
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricApparentEnergyExtensionsTest.g.cs
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricApparentEnergy;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricApparentEnergyExtensionsTests
+ {
+ [Fact]
+ public void NumberToKilovoltampereHoursTest() =>
+ Assert.Equal(ElectricApparentEnergy.FromKilovoltampereHours(2), 2.KilovoltampereHours());
+
+ [Fact]
+ public void NumberToMegavoltampereHoursTest() =>
+ Assert.Equal(ElectricApparentEnergy.FromMegavoltampereHours(2), 2.MegavoltampereHours());
+
+ [Fact]
+ public void NumberToVoltampereHoursTest() =>
+ Assert.Equal(ElectricApparentEnergy.FromVoltampereHours(2), 2.VoltampereHours());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricApparentPowerExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricApparentPowerExtensionsTest.g.cs
new file mode 100644
index 0000000000..8d6d76eda6
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricApparentPowerExtensionsTest.g.cs
@@ -0,0 +1,52 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricApparentPower;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricApparentPowerExtensionsTests
+ {
+ [Fact]
+ public void NumberToGigavoltamperesTest() =>
+ Assert.Equal(ElectricApparentPower.FromGigavoltamperes(2), 2.Gigavoltamperes());
+
+ [Fact]
+ public void NumberToKilovoltamperesTest() =>
+ Assert.Equal(ElectricApparentPower.FromKilovoltamperes(2), 2.Kilovoltamperes());
+
+ [Fact]
+ public void NumberToMegavoltamperesTest() =>
+ Assert.Equal(ElectricApparentPower.FromMegavoltamperes(2), 2.Megavoltamperes());
+
+ [Fact]
+ public void NumberToMicrovoltamperesTest() =>
+ Assert.Equal(ElectricApparentPower.FromMicrovoltamperes(2), 2.Microvoltamperes());
+
+ [Fact]
+ public void NumberToMillivoltamperesTest() =>
+ Assert.Equal(ElectricApparentPower.FromMillivoltamperes(2), 2.Millivoltamperes());
+
+ [Fact]
+ public void NumberToVoltamperesTest() =>
+ Assert.Equal(ElectricApparentPower.FromVoltamperes(2), 2.Voltamperes());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricCapacitanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricCapacitanceExtensionsTest.g.cs
new file mode 100644
index 0000000000..f5690a30a7
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricCapacitanceExtensionsTest.g.cs
@@ -0,0 +1,56 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricCapacitance;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricCapacitanceExtensionsTests
+ {
+ [Fact]
+ public void NumberToFaradsTest() =>
+ Assert.Equal(ElectricCapacitance.FromFarads(2), 2.Farads());
+
+ [Fact]
+ public void NumberToKilofaradsTest() =>
+ Assert.Equal(ElectricCapacitance.FromKilofarads(2), 2.Kilofarads());
+
+ [Fact]
+ public void NumberToMegafaradsTest() =>
+ Assert.Equal(ElectricCapacitance.FromMegafarads(2), 2.Megafarads());
+
+ [Fact]
+ public void NumberToMicrofaradsTest() =>
+ Assert.Equal(ElectricCapacitance.FromMicrofarads(2), 2.Microfarads());
+
+ [Fact]
+ public void NumberToMillifaradsTest() =>
+ Assert.Equal(ElectricCapacitance.FromMillifarads(2), 2.Millifarads());
+
+ [Fact]
+ public void NumberToNanofaradsTest() =>
+ Assert.Equal(ElectricCapacitance.FromNanofarads(2), 2.Nanofarads());
+
+ [Fact]
+ public void NumberToPicofaradsTest() =>
+ Assert.Equal(ElectricCapacitance.FromPicofarads(2), 2.Picofarads());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricConductanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricConductanceExtensionsTest.g.cs
index 354f79c390..d4c9cab72d 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricConductanceExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricConductanceExtensionsTest.g.cs
@@ -24,18 +24,54 @@ namespace UnitsNet.Tests
{
public class NumberToElectricConductanceExtensionsTests
{
+ [Fact]
+ public void NumberToGigamhosTest() =>
+ Assert.Equal(ElectricConductance.FromGigamhos(2), 2.Gigamhos());
+
+ [Fact]
+ public void NumberToGigasiemensTest() =>
+ Assert.Equal(ElectricConductance.FromGigasiemens(2), 2.Gigasiemens());
+
+ [Fact]
+ public void NumberToKilomhosTest() =>
+ Assert.Equal(ElectricConductance.FromKilomhos(2), 2.Kilomhos());
+
[Fact]
public void NumberToKilosiemensTest() =>
Assert.Equal(ElectricConductance.FromKilosiemens(2), 2.Kilosiemens());
+ [Fact]
+ public void NumberToMegamhosTest() =>
+ Assert.Equal(ElectricConductance.FromMegamhos(2), 2.Megamhos());
+
+ [Fact]
+ public void NumberToMegasiemensTest() =>
+ Assert.Equal(ElectricConductance.FromMegasiemens(2), 2.Megasiemens());
+
+ [Fact]
+ public void NumberToMhosTest() =>
+ Assert.Equal(ElectricConductance.FromMhos(2), 2.Mhos());
+
+ [Fact]
+ public void NumberToMicromhosTest() =>
+ Assert.Equal(ElectricConductance.FromMicromhos(2), 2.Micromhos());
+
[Fact]
public void NumberToMicrosiemensTest() =>
Assert.Equal(ElectricConductance.FromMicrosiemens(2), 2.Microsiemens());
+ [Fact]
+ public void NumberToMillimhosTest() =>
+ Assert.Equal(ElectricConductance.FromMillimhos(2), 2.Millimhos());
+
[Fact]
public void NumberToMillisiemensTest() =>
Assert.Equal(ElectricConductance.FromMillisiemens(2), 2.Millisiemens());
+ [Fact]
+ public void NumberToNanomhosTest() =>
+ Assert.Equal(ElectricConductance.FromNanomhos(2), 2.Nanomhos());
+
[Fact]
public void NumberToNanosiemensTest() =>
Assert.Equal(ElectricConductance.FromNanosiemens(2), 2.Nanosiemens());
@@ -44,5 +80,13 @@ public void NumberToNanosiemensTest() =>
public void NumberToSiemensTest() =>
Assert.Equal(ElectricConductance.FromSiemens(2), 2.Siemens());
+ [Fact]
+ public void NumberToTeramhosTest() =>
+ Assert.Equal(ElectricConductance.FromTeramhos(2), 2.Teramhos());
+
+ [Fact]
+ public void NumberToTerasiemensTest() =>
+ Assert.Equal(ElectricConductance.FromTerasiemens(2), 2.Terasiemens());
+
}
}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricImpedanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricImpedanceExtensionsTest.g.cs
new file mode 100644
index 0000000000..3357beee27
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricImpedanceExtensionsTest.g.cs
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricImpedance;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricImpedanceExtensionsTests
+ {
+ [Fact]
+ public void NumberToGigaohmsTest() =>
+ Assert.Equal(ElectricImpedance.FromGigaohms(2), 2.Gigaohms());
+
+ [Fact]
+ public void NumberToKiloohmsTest() =>
+ Assert.Equal(ElectricImpedance.FromKiloohms(2), 2.Kiloohms());
+
+ [Fact]
+ public void NumberToMegaohmsTest() =>
+ Assert.Equal(ElectricImpedance.FromMegaohms(2), 2.Megaohms());
+
+ [Fact]
+ public void NumberToMicroohmsTest() =>
+ Assert.Equal(ElectricImpedance.FromMicroohms(2), 2.Microohms());
+
+ [Fact]
+ public void NumberToMilliohmsTest() =>
+ Assert.Equal(ElectricImpedance.FromMilliohms(2), 2.Milliohms());
+
+ [Fact]
+ public void NumberToNanoohmsTest() =>
+ Assert.Equal(ElectricImpedance.FromNanoohms(2), 2.Nanoohms());
+
+ [Fact]
+ public void NumberToOhmsTest() =>
+ Assert.Equal(ElectricImpedance.FromOhms(2), 2.Ohms());
+
+ [Fact]
+ public void NumberToTeraohmsTest() =>
+ Assert.Equal(ElectricImpedance.FromTeraohms(2), 2.Teraohms());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactanceExtensionsTest.g.cs
new file mode 100644
index 0000000000..58574611f9
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactanceExtensionsTest.g.cs
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricReactance;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricReactanceExtensionsTests
+ {
+ [Fact]
+ public void NumberToGigaohmsTest() =>
+ Assert.Equal(ElectricReactance.FromGigaohms(2), 2.Gigaohms());
+
+ [Fact]
+ public void NumberToKiloohmsTest() =>
+ Assert.Equal(ElectricReactance.FromKiloohms(2), 2.Kiloohms());
+
+ [Fact]
+ public void NumberToMegaohmsTest() =>
+ Assert.Equal(ElectricReactance.FromMegaohms(2), 2.Megaohms());
+
+ [Fact]
+ public void NumberToMicroohmsTest() =>
+ Assert.Equal(ElectricReactance.FromMicroohms(2), 2.Microohms());
+
+ [Fact]
+ public void NumberToMilliohmsTest() =>
+ Assert.Equal(ElectricReactance.FromMilliohms(2), 2.Milliohms());
+
+ [Fact]
+ public void NumberToNanoohmsTest() =>
+ Assert.Equal(ElectricReactance.FromNanoohms(2), 2.Nanoohms());
+
+ [Fact]
+ public void NumberToOhmsTest() =>
+ Assert.Equal(ElectricReactance.FromOhms(2), 2.Ohms());
+
+ [Fact]
+ public void NumberToTeraohmsTest() =>
+ Assert.Equal(ElectricReactance.FromTeraohms(2), 2.Teraohms());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactiveEnergyExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactiveEnergyExtensionsTest.g.cs
new file mode 100644
index 0000000000..0786448426
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactiveEnergyExtensionsTest.g.cs
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricReactiveEnergy;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricReactiveEnergyExtensionsTests
+ {
+ [Fact]
+ public void NumberToKilovoltampereReactiveHoursTest() =>
+ Assert.Equal(ElectricReactiveEnergy.FromKilovoltampereReactiveHours(2), 2.KilovoltampereReactiveHours());
+
+ [Fact]
+ public void NumberToMegavoltampereReactiveHoursTest() =>
+ Assert.Equal(ElectricReactiveEnergy.FromMegavoltampereReactiveHours(2), 2.MegavoltampereReactiveHours());
+
+ [Fact]
+ public void NumberToVoltampereReactiveHoursTest() =>
+ Assert.Equal(ElectricReactiveEnergy.FromVoltampereReactiveHours(2), 2.VoltampereReactiveHours());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactivePowerExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactivePowerExtensionsTest.g.cs
new file mode 100644
index 0000000000..56f6858b80
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricReactivePowerExtensionsTest.g.cs
@@ -0,0 +1,44 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricReactivePower;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricReactivePowerExtensionsTests
+ {
+ [Fact]
+ public void NumberToGigavoltamperesReactiveTest() =>
+ Assert.Equal(ElectricReactivePower.FromGigavoltamperesReactive(2), 2.GigavoltamperesReactive());
+
+ [Fact]
+ public void NumberToKilovoltamperesReactiveTest() =>
+ Assert.Equal(ElectricReactivePower.FromKilovoltamperesReactive(2), 2.KilovoltamperesReactive());
+
+ [Fact]
+ public void NumberToMegavoltamperesReactiveTest() =>
+ Assert.Equal(ElectricReactivePower.FromMegavoltamperesReactive(2), 2.MegavoltamperesReactive());
+
+ [Fact]
+ public void NumberToVoltamperesReactiveTest() =>
+ Assert.Equal(ElectricReactivePower.FromVoltamperesReactive(2), 2.VoltamperesReactive());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricResistanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricResistanceExtensionsTest.g.cs
index 68121545a5..5d841d768f 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricResistanceExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricResistanceExtensionsTest.g.cs
@@ -44,6 +44,10 @@ public void NumberToMicroohmsTest() =>
public void NumberToMilliohmsTest() =>
Assert.Equal(ElectricResistance.FromMilliohms(2), 2.Milliohms());
+ [Fact]
+ public void NumberToNanoohmsTest() =>
+ Assert.Equal(ElectricResistance.FromNanoohms(2), 2.Nanoohms());
+
[Fact]
public void NumberToOhmsTest() =>
Assert.Equal(ElectricResistance.FromOhms(2), 2.Ohms());
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricSusceptanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricSusceptanceExtensionsTest.g.cs
new file mode 100644
index 0000000000..53be089919
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricSusceptanceExtensionsTest.g.cs
@@ -0,0 +1,92 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using UnitsNet.NumberExtensions.NumberToElectricSusceptance;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToElectricSusceptanceExtensionsTests
+ {
+ [Fact]
+ public void NumberToGigamhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromGigamhos(2), 2.Gigamhos());
+
+ [Fact]
+ public void NumberToGigasiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromGigasiemens(2), 2.Gigasiemens());
+
+ [Fact]
+ public void NumberToKilomhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromKilomhos(2), 2.Kilomhos());
+
+ [Fact]
+ public void NumberToKilosiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromKilosiemens(2), 2.Kilosiemens());
+
+ [Fact]
+ public void NumberToMegamhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromMegamhos(2), 2.Megamhos());
+
+ [Fact]
+ public void NumberToMegasiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromMegasiemens(2), 2.Megasiemens());
+
+ [Fact]
+ public void NumberToMhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromMhos(2), 2.Mhos());
+
+ [Fact]
+ public void NumberToMicromhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromMicromhos(2), 2.Micromhos());
+
+ [Fact]
+ public void NumberToMicrosiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromMicrosiemens(2), 2.Microsiemens());
+
+ [Fact]
+ public void NumberToMillimhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromMillimhos(2), 2.Millimhos());
+
+ [Fact]
+ public void NumberToMillisiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromMillisiemens(2), 2.Millisiemens());
+
+ [Fact]
+ public void NumberToNanomhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromNanomhos(2), 2.Nanomhos());
+
+ [Fact]
+ public void NumberToNanosiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromNanosiemens(2), 2.Nanosiemens());
+
+ [Fact]
+ public void NumberToSiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromSiemens(2), 2.Siemens());
+
+ [Fact]
+ public void NumberToTeramhosTest() =>
+ Assert.Equal(ElectricSusceptance.FromTeramhos(2), 2.Teramhos());
+
+ [Fact]
+ public void NumberToTerasiemensTest() =>
+ Assert.Equal(ElectricSusceptance.FromTerasiemens(2), 2.Terasiemens());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj b/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj
index 53da575809..2265b137b7 100644
--- a/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj
+++ b/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj
@@ -18,12 +18,6 @@
true
-
-
-
-
-
-
@@ -39,8 +33,4 @@
-
-
-
-
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs
index 9d22f10bd9..75b2946663 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentEnergyExtensions.g.cs
@@ -30,9 +30,11 @@ namespace UnitsNet.NumberExtensions.NumberToApparentEnergy
///
/// A number to ApparentEnergy Extensions
///
+ [Obsolete("ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.")]
public static class NumberToApparentEnergyExtensions
{
///
+ [Obsolete("ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.")]
public static ApparentEnergy KilovoltampereHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -41,6 +43,7 @@ public static ApparentEnergy KilovoltampereHours(this T value)
=> ApparentEnergy.FromKilovoltampereHours(Convert.ToDouble(value));
///
+ [Obsolete("ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.")]
public static ApparentEnergy MegavoltampereHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -49,6 +52,7 @@ public static ApparentEnergy MegavoltampereHours(this T value)
=> ApparentEnergy.FromMegavoltampereHours(Convert.ToDouble(value));
///
+ [Obsolete("ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.")]
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..83beac0dc4 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToApparentPowerExtensions.g.cs
@@ -30,9 +30,11 @@ namespace UnitsNet.NumberExtensions.NumberToApparentPower
///
/// A number to ApparentPower Extensions
///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public static class NumberToApparentPowerExtensions
{
///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public static ApparentPower Gigavoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -41,6 +43,7 @@ public static ApparentPower Gigavoltamperes(this T value)
=> ApparentPower.FromGigavoltamperes(Convert.ToDouble(value));
///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public static ApparentPower Kilovoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -49,6 +52,7 @@ public static ApparentPower Kilovoltamperes(this T value)
=> ApparentPower.FromKilovoltamperes(Convert.ToDouble(value));
///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public static ApparentPower Megavoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -57,6 +61,7 @@ public static ApparentPower Megavoltamperes(this T value)
=> ApparentPower.FromMegavoltamperes(Convert.ToDouble(value));
///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public static ApparentPower Microvoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -65,6 +70,7 @@ public static ApparentPower Microvoltamperes(this T value)
=> ApparentPower.FromMicrovoltamperes(Convert.ToDouble(value));
///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public static ApparentPower Millivoltamperes(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -73,6 +79,7 @@ public static ApparentPower Millivoltamperes(this T value)
=> ApparentPower.FromMillivoltamperes(Convert.ToDouble(value));
///
+ [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
public static ApparentPower Voltamperes(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..49cedcd5c0 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToCapacitanceExtensions.g.cs
@@ -30,9 +30,11 @@ namespace UnitsNet.NumberExtensions.NumberToCapacitance
///
/// A number to Capacitance Extensions
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static class NumberToCapacitanceExtensions
{
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static Capacitance Farads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -41,6 +43,7 @@ public static Capacitance Farads(this T value)
=> Capacitance.FromFarads(Convert.ToDouble(value));
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static Capacitance Kilofarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -49,6 +52,7 @@ public static Capacitance Kilofarads(this T value)
=> Capacitance.FromKilofarads(Convert.ToDouble(value));
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static Capacitance Megafarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -57,6 +61,7 @@ public static Capacitance Megafarads(this T value)
=> Capacitance.FromMegafarads(Convert.ToDouble(value));
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static Capacitance Microfarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -65,6 +70,7 @@ public static Capacitance Microfarads(this T value)
=> Capacitance.FromMicrofarads(Convert.ToDouble(value));
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static Capacitance Millifarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -73,6 +79,7 @@ public static Capacitance Millifarads(this T value)
=> Capacitance.FromMillifarads(Convert.ToDouble(value));
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static Capacitance Nanofarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -81,6 +88,7 @@ public static Capacitance Nanofarads(this T value)
=> Capacitance.FromNanofarads(Convert.ToDouble(value));
///
+ [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
public static Capacitance Picofarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs
index 8d84623f00..a6ec44ed0f 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs
@@ -30,9 +30,83 @@ namespace UnitsNet.NumberExtensions.NumberToElectricAdmittance
///
/// A number to ElectricAdmittance Extensions
///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
public static class NumberToElectricAdmittanceExtensions
{
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Gigamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromGigamhos(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Gigasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromGigasiemens(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Kilomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromKilomhos(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Kilosiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromKilosiemens(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Megamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMegamhos(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Megasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMegasiemens(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Mhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMhos(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Micromhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMicromhos(Convert.ToDouble(value));
+
///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
public static ElectricAdmittance Microsiemens(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -40,7 +114,17 @@ public static ElectricAdmittance Microsiemens(this T value)
#endif
=> ElectricAdmittance.FromMicrosiemens(Convert.ToDouble(value));
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Millimhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMillimhos(Convert.ToDouble(value));
+
///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
public static ElectricAdmittance Millisiemens(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -48,7 +132,17 @@ public static ElectricAdmittance Millisiemens(this T value)
#endif
=> ElectricAdmittance.FromMillisiemens(Convert.ToDouble(value));
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Nanomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromNanomhos(Convert.ToDouble(value));
+
///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
public static ElectricAdmittance Nanosiemens(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -57,6 +151,7 @@ public static ElectricAdmittance Nanosiemens(this T value)
=> ElectricAdmittance.FromNanosiemens(Convert.ToDouble(value));
///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
public static ElectricAdmittance Siemens(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -64,5 +159,23 @@ public static ElectricAdmittance Siemens(this T value)
#endif
=> ElectricAdmittance.FromSiemens(Convert.ToDouble(value));
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Teramhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromTeramhos(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Admittance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricConductance or ElectricSusceptance instead.")]
+ public static ElectricAdmittance Terasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromTerasiemens(Convert.ToDouble(value));
+
}
}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricApparentEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricApparentEnergyExtensions.g.cs
new file mode 100644
index 0000000000..33e6e5e3fe
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricApparentEnergyExtensions.g.cs
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricApparentEnergy
+{
+ ///
+ /// A number to ElectricApparentEnergy Extensions
+ ///
+ public static class NumberToElectricApparentEnergyExtensions
+ {
+ ///
+ public static ElectricApparentEnergy KilovoltampereHours(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentEnergy.FromKilovoltampereHours(Convert.ToDouble(value));
+
+ ///
+ public static ElectricApparentEnergy MegavoltampereHours(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentEnergy.FromMegavoltampereHours(Convert.ToDouble(value));
+
+ ///
+ public static ElectricApparentEnergy VoltampereHours(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentEnergy.FromVoltampereHours(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricApparentPowerExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricApparentPowerExtensions.g.cs
new file mode 100644
index 0000000000..e411c6479b
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricApparentPowerExtensions.g.cs
@@ -0,0 +1,84 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricApparentPower
+{
+ ///
+ /// A number to ElectricApparentPower Extensions
+ ///
+ public static class NumberToElectricApparentPowerExtensions
+ {
+ ///
+ public static ElectricApparentPower Gigavoltamperes(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentPower.FromGigavoltamperes(Convert.ToDouble(value));
+
+ ///
+ public static ElectricApparentPower Kilovoltamperes(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentPower.FromKilovoltamperes(Convert.ToDouble(value));
+
+ ///
+ public static ElectricApparentPower Megavoltamperes(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentPower.FromMegavoltamperes(Convert.ToDouble(value));
+
+ ///
+ public static ElectricApparentPower Microvoltamperes(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentPower.FromMicrovoltamperes(Convert.ToDouble(value));
+
+ ///
+ public static ElectricApparentPower Millivoltamperes(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentPower.FromMillivoltamperes(Convert.ToDouble(value));
+
+ ///
+ public static ElectricApparentPower Voltamperes(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricApparentPower.FromVoltamperes(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCapacitanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCapacitanceExtensions.g.cs
new file mode 100644
index 0000000000..39dae7a951
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricCapacitanceExtensions.g.cs
@@ -0,0 +1,92 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricCapacitance
+{
+ ///
+ /// A number to ElectricCapacitance Extensions
+ ///
+ public static class NumberToElectricCapacitanceExtensions
+ {
+ ///
+ public static ElectricCapacitance Farads(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricCapacitance.FromFarads(Convert.ToDouble(value));
+
+ ///
+ public static ElectricCapacitance Kilofarads(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricCapacitance.FromKilofarads(Convert.ToDouble(value));
+
+ ///
+ public static ElectricCapacitance Megafarads(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricCapacitance.FromMegafarads(Convert.ToDouble(value));
+
+ ///
+ public static ElectricCapacitance Microfarads(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricCapacitance.FromMicrofarads(Convert.ToDouble(value));
+
+ ///
+ public static ElectricCapacitance Millifarads(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricCapacitance.FromMillifarads(Convert.ToDouble(value));
+
+ ///
+ public static ElectricCapacitance Nanofarads(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricCapacitance.FromNanofarads(Convert.ToDouble(value));
+
+ ///
+ public static ElectricCapacitance Picofarads(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricCapacitance.FromPicofarads(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs
index e7ba0e2806..6583c97d68 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricConductanceExtensions.g.cs
@@ -32,6 +32,30 @@ namespace UnitsNet.NumberExtensions.NumberToElectricConductance
///
public static class NumberToElectricConductanceExtensions
{
+ ///
+ public static ElectricConductance Gigamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromGigamhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricConductance Gigasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromGigasiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricConductance Kilomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromKilomhos(Convert.ToDouble(value));
+
///
public static ElectricConductance Kilosiemens(this T value)
where T : notnull
@@ -40,6 +64,38 @@ public static ElectricConductance Kilosiemens(this T value)
#endif
=> ElectricConductance.FromKilosiemens(Convert.ToDouble(value));
+ ///
+ public static ElectricConductance Megamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromMegamhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricConductance Megasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromMegasiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricConductance Mhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromMhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricConductance Micromhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromMicromhos(Convert.ToDouble(value));
+
///
public static ElectricConductance Microsiemens(this T value)
where T : notnull
@@ -48,6 +104,14 @@ public static ElectricConductance Microsiemens(this T value)
#endif
=> ElectricConductance.FromMicrosiemens(Convert.ToDouble(value));
+ ///
+ public static ElectricConductance Millimhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromMillimhos(Convert.ToDouble(value));
+
///
public static ElectricConductance Millisiemens(this T value)
where T : notnull
@@ -56,6 +120,14 @@ public static ElectricConductance Millisiemens(this T value)
#endif
=> ElectricConductance.FromMillisiemens(Convert.ToDouble(value));
+ ///
+ public static ElectricConductance Nanomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromNanomhos(Convert.ToDouble(value));
+
///
public static ElectricConductance Nanosiemens(this T value)
where T : notnull
@@ -72,5 +144,21 @@ public static ElectricConductance Siemens(this T value)
#endif
=> ElectricConductance.FromSiemens(Convert.ToDouble(value));
+ ///
+ public static ElectricConductance Teramhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromTeramhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricConductance Terasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricConductance.FromTerasiemens(Convert.ToDouble(value));
+
}
}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricImpedanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricImpedanceExtensions.g.cs
new file mode 100644
index 0000000000..a1d9ec34ad
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricImpedanceExtensions.g.cs
@@ -0,0 +1,109 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricImpedance
+{
+ ///
+ /// A number to ElectricImpedance Extensions
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static class NumberToElectricImpedanceExtensions
+ {
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Gigaohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromGigaohms(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Kiloohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromKiloohms(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Megaohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromMegaohms(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Microohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromMicroohms(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Milliohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromMilliohms(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Nanoohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromNanoohms(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Ohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromOhms(Convert.ToDouble(value));
+
+ ///
+ [Obsolete("Impedance is a complex number, which is not currently supported by UnitsNet. Please use either ElectricResistance or ElectricReactance instead.")]
+ public static ElectricImpedance Teraohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromTeraohms(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs
index 24cb4db585..c96d911848 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialAcExtensions.g.cs
@@ -30,9 +30,11 @@ namespace UnitsNet.NumberExtensions.NumberToElectricPotentialAc
///
/// A number to ElectricPotentialAc Extensions
///
+ [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static class NumberToElectricPotentialAcExtensions
{
///
+ [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialAc KilovoltsAc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -41,6 +43,7 @@ public static ElectricPotentialAc KilovoltsAc(this T value)
=> ElectricPotentialAc.FromKilovoltsAc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialAc MegavoltsAc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -49,6 +52,7 @@ public static ElectricPotentialAc MegavoltsAc(this T value)
=> ElectricPotentialAc.FromMegavoltsAc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialAc MicrovoltsAc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -57,6 +61,7 @@ public static ElectricPotentialAc MicrovoltsAc(this T value)
=> ElectricPotentialAc.FromMicrovoltsAc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialAc MillivoltsAc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -65,6 +70,7 @@ public static ElectricPotentialAc MillivoltsAc(this T value)
=> ElectricPotentialAc.FromMillivoltsAc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialAc VoltsAc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs
index 62ab533375..7c0d98f60e 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricPotentialDcExtensions.g.cs
@@ -30,9 +30,11 @@ namespace UnitsNet.NumberExtensions.NumberToElectricPotentialDc
///
/// A number to ElectricPotentialDc Extensions
///
+ [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static class NumberToElectricPotentialDcExtensions
{
///
+ [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialDc KilovoltsDc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -41,6 +43,7 @@ public static ElectricPotentialDc KilovoltsDc(this T value)
=> ElectricPotentialDc.FromKilovoltsDc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialDc MegavoltsDc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -49,6 +52,7 @@ public static ElectricPotentialDc MegavoltsDc(this T value)
=> ElectricPotentialDc.FromMegavoltsDc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialDc MicrovoltsDc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -57,6 +61,7 @@ public static ElectricPotentialDc MicrovoltsDc(this T value)
=> ElectricPotentialDc.FromMicrovoltsDc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialDc MillivoltsDc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -65,6 +70,7 @@ public static ElectricPotentialDc MillivoltsDc(this T value)
=> ElectricPotentialDc.FromMillivoltsDc(Convert.ToDouble(value));
///
+ [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
public static ElectricPotentialDc VoltsDc(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactanceExtensions.g.cs
new file mode 100644
index 0000000000..368804a214
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactanceExtensions.g.cs
@@ -0,0 +1,100 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricReactance
+{
+ ///
+ /// A number to ElectricReactance Extensions
+ ///
+ public static class NumberToElectricReactanceExtensions
+ {
+ ///
+ public static ElectricReactance Gigaohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromGigaohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactance Kiloohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromKiloohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactance Megaohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromMegaohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactance Microohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromMicroohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactance Milliohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromMilliohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactance Nanoohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromNanoohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactance Ohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromOhms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactance Teraohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactance.FromTeraohms(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactiveEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactiveEnergyExtensions.g.cs
new file mode 100644
index 0000000000..1b40fa12ee
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactiveEnergyExtensions.g.cs
@@ -0,0 +1,60 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricReactiveEnergy
+{
+ ///
+ /// A number to ElectricReactiveEnergy Extensions
+ ///
+ public static class NumberToElectricReactiveEnergyExtensions
+ {
+ ///
+ public static ElectricReactiveEnergy KilovoltampereReactiveHours(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactiveEnergy.FromKilovoltampereReactiveHours(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactiveEnergy MegavoltampereReactiveHours(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactiveEnergy.FromMegavoltampereReactiveHours(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactiveEnergy VoltampereReactiveHours(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactiveEnergy.FromVoltampereReactiveHours(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactivePowerExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactivePowerExtensions.g.cs
new file mode 100644
index 0000000000..f892d3c9e3
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactivePowerExtensions.g.cs
@@ -0,0 +1,68 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricReactivePower
+{
+ ///
+ /// A number to ElectricReactivePower Extensions
+ ///
+ public static class NumberToElectricReactivePowerExtensions
+ {
+ ///
+ public static ElectricReactivePower GigavoltamperesReactive(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactivePower.FromGigavoltamperesReactive(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactivePower KilovoltamperesReactive(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactivePower.FromKilovoltamperesReactive(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactivePower MegavoltamperesReactive(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactivePower.FromMegavoltamperesReactive(Convert.ToDouble(value));
+
+ ///
+ public static ElectricReactivePower VoltamperesReactive(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricReactivePower.FromVoltamperesReactive(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs
index a616e57ac7..f54e7eec40 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricResistanceExtensions.g.cs
@@ -72,6 +72,14 @@ public static ElectricResistance Milliohms(this T value)
#endif
=> ElectricResistance.FromMilliohms(Convert.ToDouble(value));
+ ///
+ public static ElectricResistance Nanoohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricResistance.FromNanoohms(Convert.ToDouble(value));
+
///
public static ElectricResistance Ohms(this T value)
where T : notnull
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricSusceptanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricSusceptanceExtensions.g.cs
new file mode 100644
index 0000000000..776a2507d7
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricSusceptanceExtensions.g.cs
@@ -0,0 +1,164 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// 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
+
+namespace UnitsNet.NumberExtensions.NumberToElectricSusceptance
+{
+ ///
+ /// A number to ElectricSusceptance Extensions
+ ///
+ public static class NumberToElectricSusceptanceExtensions
+ {
+ ///
+ public static ElectricSusceptance Gigamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromGigamhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Gigasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromGigasiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Kilomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromKilomhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Kilosiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromKilosiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Megamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromMegamhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Megasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromMegasiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Mhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromMhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Micromhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromMicromhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Microsiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromMicrosiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Millimhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromMillimhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Millisiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromMillisiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Nanomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromNanomhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Nanosiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromNanosiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Siemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromSiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Teramhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromTeramhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricSusceptance Terasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricSusceptance.FromTerasiemens(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs
index 9d49cd8dc4..ee6f44f9fa 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactiveEnergyExtensions.g.cs
@@ -30,9 +30,11 @@ namespace UnitsNet.NumberExtensions.NumberToReactiveEnergy
///
/// A number to ReactiveEnergy Extensions
///
+ [Obsolete("ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.")]
public static class NumberToReactiveEnergyExtensions
{
///
+ [Obsolete("ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.")]
public static ReactiveEnergy KilovoltampereReactiveHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -41,6 +43,7 @@ public static ReactiveEnergy KilovoltampereReactiveHours(this T value)
=> ReactiveEnergy.FromKilovoltampereReactiveHours(Convert.ToDouble(value));
///
+ [Obsolete("ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.")]
public static ReactiveEnergy MegavoltampereReactiveHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -49,6 +52,7 @@ public static ReactiveEnergy MegavoltampereReactiveHours(this T value)
=> ReactiveEnergy.FromMegavoltampereReactiveHours(Convert.ToDouble(value));
///
+ [Obsolete("ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.")]
public static ReactiveEnergy VoltampereReactiveHours(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs
index cd418da760..0b919a590a 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToReactivePowerExtensions.g.cs
@@ -30,9 +30,11 @@ namespace UnitsNet.NumberExtensions.NumberToReactivePower
///
/// A number to ReactivePower Extensions
///
+ [Obsolete("ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.")]
public static class NumberToReactivePowerExtensions
{
///
+ [Obsolete("ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.")]
public static ReactivePower GigavoltamperesReactive(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -41,6 +43,7 @@ public static ReactivePower GigavoltamperesReactive(this T value)
=> ReactivePower.FromGigavoltamperesReactive(Convert.ToDouble(value));
///
+ [Obsolete("ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.")]
public static ReactivePower KilovoltamperesReactive(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -49,6 +52,7 @@ public static ReactivePower KilovoltamperesReactive(this T value)
=> ReactivePower.FromKilovoltamperesReactive(Convert.ToDouble(value));
///
+ [Obsolete("ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.")]
public static ReactivePower MegavoltamperesReactive(this T value)
where T : notnull
#if NET7_0_OR_GREATER
@@ -57,6 +61,7 @@ public static ReactivePower MegavoltamperesReactive(this T value)
=> ReactivePower.FromMegavoltamperesReactive(Convert.ToDouble(value));
///
+ [Obsolete("ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.")]
public static ReactivePower VoltamperesReactive(this T value)
where T : notnull
#if NET7_0_OR_GREATER
diff --git a/UnitsNet.Tests/CustomCode/CapacitanceTests.cs b/UnitsNet.Tests/CustomCode/CapacitanceTests.cs
index 91135dfd33..1dee2ea97e 100644
--- a/UnitsNet.Tests/CustomCode/CapacitanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/CapacitanceTests.cs
@@ -32,9 +32,11 @@ public class CapacitanceTests : CapacitanceTestsBase
protected override double FaradsInOneFarad => 1;
protected override double MillifaradsInOneFarad => 1e3;
+
protected override double MicrofaradsInOneFarad => 1e6;
protected override double NanofaradsInOneFarad => 1e9;
+
protected override double PicofaradsInOneFarad => 1e12;
protected override double KilofaradsInOneFarad => 1e-3;
diff --git a/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs
index c27d4b4b9c..b3817887d5 100644
--- a/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs
@@ -28,13 +28,28 @@ namespace UnitsNet.Tests.CustomCode
public class ElectricAdmittanceTests : ElectricAdmittanceTestsBase
{
protected override bool SupportsSIUnitSystem => false;
+ protected override double NanosiemensInOneSiemens => 1E9;
+ protected override double NanomhosInOneSiemens => 1E9;
- protected override double MicrosiemensInOneSiemens => 1e+6;
+ protected override double MicrosiemensInOneSiemens => 1E6;
+ protected override double MicromhosInOneSiemens => 1E6;
- protected override double MillisiemensInOneSiemens => 1000;
-
- protected override double NanosiemensInOneSiemens => 1e+9;
+ protected override double MillisiemensInOneSiemens => 1E3;
+ protected override double MillimhosInOneSiemens => 1E3;
protected override double SiemensInOneSiemens => 1;
+ protected override double MhosInOneSiemens => 1;
+
+ protected override double KilosiemensInOneSiemens => 1E-3;
+ protected override double KilomhosInOneSiemens => 1E-3;
+
+ protected override double MegasiemensInOneSiemens => 1E-6;
+ protected override double MegamhosInOneSiemens => 1E-6;
+
+ protected override double GigasiemensInOneSiemens => 1E-9;
+ protected override double GigamhosInOneSiemens => 1E-9;
+
+ protected override double TerasiemensInOneSiemens => 1E-12;
+ protected override double TeramhosInOneSiemens => 1E-12;
}
}
diff --git a/UnitsNet.Tests/CustomCode/ElectricApparentEnergyTests.cs b/UnitsNet.Tests/CustomCode/ElectricApparentEnergyTests.cs
new file mode 100644
index 0000000000..919fa27c9b
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricApparentEnergyTests.cs
@@ -0,0 +1,34 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricApparentEnergyTests : ElectricApparentEnergyTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => false;
+
+ protected override double VoltampereHoursInOneVoltampereHour => 1;
+
+ protected override double KilovoltampereHoursInOneVoltampereHour => 1E-3;
+
+ protected override double MegavoltampereHoursInOneVoltampereHour => 1E-6;
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/ElectricApparentPowerTests.cs b/UnitsNet.Tests/CustomCode/ElectricApparentPowerTests.cs
new file mode 100644
index 0000000000..150dd10961
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricApparentPowerTests.cs
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricApparentPowerTests : ElectricApparentPowerTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => false;
+
+ protected override double VoltamperesInOneVoltampere => 1;
+
+ protected override double KilovoltamperesInOneVoltampere => 1E-3;
+
+ protected override double MegavoltamperesInOneVoltampere => 1E-6;
+
+ protected override double GigavoltamperesInOneVoltampere => 1E-9;
+
+ protected override double MicrovoltamperesInOneVoltampere => 1E6;
+
+ protected override double MillivoltamperesInOneVoltampere => 1E3;
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/ElectricCapacitanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricCapacitanceTests.cs
new file mode 100644
index 0000000000..176c2f892b
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricCapacitanceTests.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricCapacitanceTests : ElectricCapacitanceTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => true;
+
+ protected override double FaradsInOneFarad => 1;
+
+ protected override double MillifaradsInOneFarad => 1e3;
+
+ protected override double MicrofaradsInOneFarad => 1e6;
+
+ protected override double NanofaradsInOneFarad => 1e9;
+
+ protected override double PicofaradsInOneFarad => 1e12;
+
+ protected override double KilofaradsInOneFarad => 1e-3;
+
+ protected override double MegafaradsInOneFarad => 1e-6;
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs
index 1ac770eba4..253e071237 100644
--- a/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs
@@ -28,14 +28,28 @@ namespace UnitsNet.Tests.CustomCode
public class ElectricConductanceTests : ElectricConductanceTestsBase
{
protected override bool SupportsSIUnitSystem => false;
- protected override double SiemensInOneSiemens => 1;
+ protected override double NanosiemensInOneSiemens => 1E9;
+ protected override double NanomhosInOneSiemens => 1E9;
+
+ protected override double MicrosiemensInOneSiemens => 1E6;
+ protected override double MicromhosInOneSiemens => 1E6;
protected override double MillisiemensInOneSiemens => 1E3;
+ protected override double MillimhosInOneSiemens => 1E3;
- protected override double MicrosiemensInOneSiemens => 1E6;
+ protected override double SiemensInOneSiemens => 1;
+ protected override double MhosInOneSiemens => 1;
protected override double KilosiemensInOneSiemens => 1E-3;
+ protected override double KilomhosInOneSiemens => 1E-3;
- protected override double NanosiemensInOneSiemens => 1E9;
+ protected override double MegasiemensInOneSiemens => 1E-6;
+ protected override double MegamhosInOneSiemens => 1E-6;
+
+ protected override double GigasiemensInOneSiemens => 1E-9;
+ protected override double GigamhosInOneSiemens => 1E-9;
+
+ protected override double TerasiemensInOneSiemens => 1E-12;
+ protected override double TeramhosInOneSiemens => 1E-12;
}
}
diff --git a/UnitsNet.Tests/CustomCode/ElectricImpedanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricImpedanceTests.cs
new file mode 100644
index 0000000000..59152a115e
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricImpedanceTests.cs
@@ -0,0 +1,43 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricImpedanceTests : ElectricImpedanceTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => false;
+ protected override double NanoohmsInOneOhm => 1e9;
+
+ protected override double MicroohmsInOneOhm => 1e6;
+
+ protected override double MilliohmsInOneOhm => 1000;
+
+ protected override double OhmsInOneOhm => 1;
+
+ protected override double KiloohmsInOneOhm => 1e-3;
+
+ protected override double MegaohmsInOneOhm => 1e-6;
+
+ protected override double GigaohmsInOneOhm => 1e-9;
+
+ protected override double TeraohmsInOneOhm => 1e-12;
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/ElectricReactanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricReactanceTests.cs
new file mode 100644
index 0000000000..93158a3fd7
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricReactanceTests.cs
@@ -0,0 +1,43 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricReactanceTests : ElectricReactanceTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => false;
+ protected override double NanoohmsInOneOhm => 1e9;
+
+ protected override double MicroohmsInOneOhm => 1e6;
+
+ protected override double MilliohmsInOneOhm => 1000;
+
+ protected override double OhmsInOneOhm => 1;
+
+ protected override double KiloohmsInOneOhm => 1e-3;
+
+ protected override double MegaohmsInOneOhm => 1e-6;
+
+ protected override double GigaohmsInOneOhm => 1e-9;
+
+ protected override double TeraohmsInOneOhm => 1e-12;
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/ElectricReactiveEnergyTests.cs b/UnitsNet.Tests/CustomCode/ElectricReactiveEnergyTests.cs
new file mode 100644
index 0000000000..fa691f0a7a
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricReactiveEnergyTests.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricReactiveEnergyTests : ElectricReactiveEnergyTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => false;
+ protected override double VoltampereReactiveHoursInOneVoltampereReactiveHour => 1;
+
+ protected override double KilovoltampereReactiveHoursInOneVoltampereReactiveHour => 1E-3;
+
+ protected override double MegavoltampereReactiveHoursInOneVoltampereReactiveHour => 1E-6;
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/ElectricReactivePowerTests.cs b/UnitsNet.Tests/CustomCode/ElectricReactivePowerTests.cs
new file mode 100644
index 0000000000..1ee3157806
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricReactivePowerTests.cs
@@ -0,0 +1,35 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricReactivePowerTests : ElectricReactivePowerTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => false;
+ protected override double VoltamperesReactiveInOneVoltampereReactive => 1;
+
+ protected override double KilovoltamperesReactiveInOneVoltampereReactive => 1E-3;
+
+ protected override double MegavoltamperesReactiveInOneVoltampereReactive => 1E-6;
+
+ protected override double GigavoltamperesReactiveInOneVoltampereReactive => 1E-9;
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs
index 3b88d7baa4..898b7f2000 100644
--- a/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs
@@ -8,6 +8,8 @@ namespace UnitsNet.Tests
public class ElectricResistanceTests : ElectricResistanceTestsBase
{
protected override bool SupportsSIUnitSystem => false;
+ protected override double NanoohmsInOneOhm => 1e9;
+
protected override double MicroohmsInOneOhm => 1e6;
protected override double MilliohmsInOneOhm => 1000;
diff --git a/UnitsNet.Tests/CustomCode/ElectricSusceptanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricSusceptanceTests.cs
new file mode 100644
index 0000000000..4f7b8cd9a9
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/ElectricSusceptanceTests.cs
@@ -0,0 +1,51 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace UnitsNet.Tests.CustomCode
+{
+ public class ElectricSusceptanceTests : ElectricSusceptanceTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => false;
+ protected override double NanosiemensInOneSiemens => 1E9;
+ protected override double NanomhosInOneSiemens => 1E9;
+
+ protected override double MicrosiemensInOneSiemens => 1E6;
+ protected override double MicromhosInOneSiemens => 1E6;
+
+ protected override double MillisiemensInOneSiemens => 1E3;
+ protected override double MillimhosInOneSiemens => 1E3;
+
+ protected override double SiemensInOneSiemens => 1;
+ protected override double MhosInOneSiemens => 1;
+
+ protected override double KilosiemensInOneSiemens => 1E-3;
+ protected override double KilomhosInOneSiemens => 1E-3;
+
+ protected override double MegasiemensInOneSiemens => 1E-6;
+ protected override double MegamhosInOneSiemens => 1E-6;
+
+ protected override double GigasiemensInOneSiemens => 1E-9;
+ protected override double GigamhosInOneSiemens => 1E-9;
+
+ protected override double TerasiemensInOneSiemens => 1E-12;
+ protected override double TeramhosInOneSiemens => 1E-12;
+ }
+}
diff --git a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
index 293a606945..0966041166 100644
--- a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
@@ -53,23 +53,31 @@ void Assertion(int expectedValue, Enum expectedUnit, IQuantity quantity)
Assertion(3, DoseAreaProductUnit.MilligraySquareMillimeter, Quantity.From(3, DoseAreaProductUnit.MilligraySquareMillimeter));
Assertion(3, DurationUnit.Year365, Quantity.From(3, DurationUnit.Year365));
Assertion(3, DynamicViscosityUnit.Reyn, Quantity.From(3, DynamicViscosityUnit.Reyn));
- Assertion(3, ElectricAdmittanceUnit.Siemens, Quantity.From(3, ElectricAdmittanceUnit.Siemens));
+ Assertion(3, ElectricAdmittanceUnit.Terasiemens, Quantity.From(3, ElectricAdmittanceUnit.Terasiemens));
+ Assertion(3, ElectricApparentEnergyUnit.VoltampereHour, Quantity.From(3, ElectricApparentEnergyUnit.VoltampereHour));
+ Assertion(3, ElectricApparentPowerUnit.Voltampere, Quantity.From(3, ElectricApparentPowerUnit.Voltampere));
+ Assertion(3, ElectricCapacitanceUnit.Picofarad, Quantity.From(3, ElectricCapacitanceUnit.Picofarad));
Assertion(3, ElectricChargeUnit.Picocoulomb, Quantity.From(3, ElectricChargeUnit.Picocoulomb));
Assertion(3, ElectricChargeDensityUnit.CoulombPerCubicMeter, Quantity.From(3, ElectricChargeDensityUnit.CoulombPerCubicMeter));
- Assertion(3, ElectricConductanceUnit.Siemens, Quantity.From(3, ElectricConductanceUnit.Siemens));
+ Assertion(3, ElectricConductanceUnit.Terasiemens, Quantity.From(3, ElectricConductanceUnit.Terasiemens));
Assertion(3, ElectricConductivityUnit.SiemensPerMeter, Quantity.From(3, ElectricConductivityUnit.SiemensPerMeter));
Assertion(3, ElectricCurrentUnit.Picoampere, Quantity.From(3, ElectricCurrentUnit.Picoampere));
Assertion(3, ElectricCurrentDensityUnit.AmperePerSquareMeter, Quantity.From(3, ElectricCurrentDensityUnit.AmperePerSquareMeter));
Assertion(3, ElectricCurrentGradientUnit.MilliamperePerSecond, Quantity.From(3, ElectricCurrentGradientUnit.MilliamperePerSecond));
Assertion(3, ElectricFieldUnit.VoltPerMeter, Quantity.From(3, ElectricFieldUnit.VoltPerMeter));
+ Assertion(3, ElectricImpedanceUnit.Teraohm, Quantity.From(3, ElectricImpedanceUnit.Teraohm));
Assertion(3, ElectricInductanceUnit.Picohenry, Quantity.From(3, ElectricInductanceUnit.Picohenry));
Assertion(3, ElectricPotentialUnit.Volt, Quantity.From(3, ElectricPotentialUnit.Volt));
Assertion(3, ElectricPotentialAcUnit.VoltAc, Quantity.From(3, ElectricPotentialAcUnit.VoltAc));
Assertion(3, ElectricPotentialChangeRateUnit.VoltPerSecond, Quantity.From(3, ElectricPotentialChangeRateUnit.VoltPerSecond));
Assertion(3, ElectricPotentialDcUnit.VoltDc, Quantity.From(3, ElectricPotentialDcUnit.VoltDc));
+ Assertion(3, ElectricReactanceUnit.Teraohm, Quantity.From(3, ElectricReactanceUnit.Teraohm));
+ Assertion(3, ElectricReactiveEnergyUnit.VoltampereReactiveHour, Quantity.From(3, ElectricReactiveEnergyUnit.VoltampereReactiveHour));
+ Assertion(3, ElectricReactivePowerUnit.VoltampereReactive, Quantity.From(3, ElectricReactivePowerUnit.VoltampereReactive));
Assertion(3, ElectricResistanceUnit.Teraohm, Quantity.From(3, ElectricResistanceUnit.Teraohm));
Assertion(3, ElectricResistivityUnit.PicoohmMeter, Quantity.From(3, ElectricResistivityUnit.PicoohmMeter));
Assertion(3, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, Quantity.From(3, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter));
+ Assertion(3, ElectricSusceptanceUnit.Terasiemens, Quantity.From(3, ElectricSusceptanceUnit.Terasiemens));
Assertion(3, EnergyUnit.WattHour, Quantity.From(3, EnergyUnit.WattHour));
Assertion(3, EnergyDensityUnit.WattHourPerCubicMeter, Quantity.From(3, EnergyDensityUnit.WattHourPerCubicMeter));
Assertion(3, EntropyUnit.MegajoulePerKelvin, Quantity.From(3, EntropyUnit.MegajoulePerKelvin));
@@ -187,6 +195,9 @@ public void QuantityInfo_IsSameAsStaticInfoProperty()
Assertion(Duration.Info, Duration.Zero);
Assertion(DynamicViscosity.Info, DynamicViscosity.Zero);
Assertion(ElectricAdmittance.Info, ElectricAdmittance.Zero);
+ Assertion(ElectricApparentEnergy.Info, ElectricApparentEnergy.Zero);
+ Assertion(ElectricApparentPower.Info, ElectricApparentPower.Zero);
+ Assertion(ElectricCapacitance.Info, ElectricCapacitance.Zero);
Assertion(ElectricCharge.Info, ElectricCharge.Zero);
Assertion(ElectricChargeDensity.Info, ElectricChargeDensity.Zero);
Assertion(ElectricConductance.Info, ElectricConductance.Zero);
@@ -195,14 +206,19 @@ public void QuantityInfo_IsSameAsStaticInfoProperty()
Assertion(ElectricCurrentDensity.Info, ElectricCurrentDensity.Zero);
Assertion(ElectricCurrentGradient.Info, ElectricCurrentGradient.Zero);
Assertion(ElectricField.Info, ElectricField.Zero);
+ Assertion(ElectricImpedance.Info, ElectricImpedance.Zero);
Assertion(ElectricInductance.Info, ElectricInductance.Zero);
Assertion(ElectricPotential.Info, ElectricPotential.Zero);
Assertion(ElectricPotentialAc.Info, ElectricPotentialAc.Zero);
Assertion(ElectricPotentialChangeRate.Info, ElectricPotentialChangeRate.Zero);
Assertion(ElectricPotentialDc.Info, ElectricPotentialDc.Zero);
+ Assertion(ElectricReactance.Info, ElectricReactance.Zero);
+ Assertion(ElectricReactiveEnergy.Info, ElectricReactiveEnergy.Zero);
+ Assertion(ElectricReactivePower.Info, ElectricReactivePower.Zero);
Assertion(ElectricResistance.Info, ElectricResistance.Zero);
Assertion(ElectricResistivity.Info, ElectricResistivity.Zero);
Assertion(ElectricSurfaceChargeDensity.Info, ElectricSurfaceChargeDensity.Zero);
+ Assertion(ElectricSusceptance.Info, ElectricSusceptance.Zero);
Assertion(Energy.Info, Energy.Zero);
Assertion(EnergyDensity.Info, EnergyDensity.Zero);
Assertion(Entropy.Info, Entropy.Zero);
@@ -320,6 +336,9 @@ public void Dimensions_IsSameAsStaticBaseDimensions()
Assertion(Duration.BaseDimensions, Duration.Zero);
Assertion(DynamicViscosity.BaseDimensions, DynamicViscosity.Zero);
Assertion(ElectricAdmittance.BaseDimensions, ElectricAdmittance.Zero);
+ Assertion(ElectricApparentEnergy.BaseDimensions, ElectricApparentEnergy.Zero);
+ Assertion(ElectricApparentPower.BaseDimensions, ElectricApparentPower.Zero);
+ Assertion(ElectricCapacitance.BaseDimensions, ElectricCapacitance.Zero);
Assertion(ElectricCharge.BaseDimensions, ElectricCharge.Zero);
Assertion(ElectricChargeDensity.BaseDimensions, ElectricChargeDensity.Zero);
Assertion(ElectricConductance.BaseDimensions, ElectricConductance.Zero);
@@ -328,14 +347,19 @@ public void Dimensions_IsSameAsStaticBaseDimensions()
Assertion(ElectricCurrentDensity.BaseDimensions, ElectricCurrentDensity.Zero);
Assertion(ElectricCurrentGradient.BaseDimensions, ElectricCurrentGradient.Zero);
Assertion(ElectricField.BaseDimensions, ElectricField.Zero);
+ Assertion(ElectricImpedance.BaseDimensions, ElectricImpedance.Zero);
Assertion(ElectricInductance.BaseDimensions, ElectricInductance.Zero);
Assertion(ElectricPotential.BaseDimensions, ElectricPotential.Zero);
Assertion(ElectricPotentialAc.BaseDimensions, ElectricPotentialAc.Zero);
Assertion(ElectricPotentialChangeRate.BaseDimensions, ElectricPotentialChangeRate.Zero);
Assertion(ElectricPotentialDc.BaseDimensions, ElectricPotentialDc.Zero);
+ Assertion(ElectricReactance.BaseDimensions, ElectricReactance.Zero);
+ Assertion(ElectricReactiveEnergy.BaseDimensions, ElectricReactiveEnergy.Zero);
+ Assertion(ElectricReactivePower.BaseDimensions, ElectricReactivePower.Zero);
Assertion(ElectricResistance.BaseDimensions, ElectricResistance.Zero);
Assertion(ElectricResistivity.BaseDimensions, ElectricResistivity.Zero);
Assertion(ElectricSurfaceChargeDensity.BaseDimensions, ElectricSurfaceChargeDensity.Zero);
+ Assertion(ElectricSusceptance.BaseDimensions, ElectricSusceptance.Zero);
Assertion(Energy.BaseDimensions, Energy.Zero);
Assertion(EnergyDensity.BaseDimensions, EnergyDensity.Zero);
Assertion(Entropy.BaseDimensions, Entropy.Zero);
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
index 3cebb5e0e3..9320d90e5b 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
@@ -39,36 +39,84 @@ namespace UnitsNet.Tests
// ReSharper disable once PartialTypeWithSinglePart
public abstract partial class ElectricAdmittanceTestsBase : QuantityTestsBase
{
+ protected abstract double GigamhosInOneSiemens { get; }
+ protected abstract double GigasiemensInOneSiemens { get; }
+ protected abstract double KilomhosInOneSiemens { get; }
+ protected abstract double KilosiemensInOneSiemens { get; }
+ protected abstract double MegamhosInOneSiemens { get; }
+ protected abstract double MegasiemensInOneSiemens { get; }
+ protected abstract double MhosInOneSiemens { get; }
+ protected abstract double MicromhosInOneSiemens { get; }
protected abstract double MicrosiemensInOneSiemens { get; }
+ protected abstract double MillimhosInOneSiemens { get; }
protected abstract double MillisiemensInOneSiemens { get; }
+ protected abstract double NanomhosInOneSiemens { get; }
protected abstract double NanosiemensInOneSiemens { get; }
protected abstract double SiemensInOneSiemens { get; }
+ protected abstract double TeramhosInOneSiemens { get; }
+ protected abstract double TerasiemensInOneSiemens { get; }
// ReSharper disable VirtualMemberNeverOverriden.Global
+ protected virtual double GigamhosTolerance { get { return 1e-5; } }
+ protected virtual double GigasiemensTolerance { get { return 1e-5; } }
+ protected virtual double KilomhosTolerance { get { return 1e-5; } }
+ protected virtual double KilosiemensTolerance { get { return 1e-5; } }
+ protected virtual double MegamhosTolerance { get { return 1e-5; } }
+ protected virtual double MegasiemensTolerance { get { return 1e-5; } }
+ protected virtual double MhosTolerance { get { return 1e-5; } }
+ protected virtual double MicromhosTolerance { get { return 1e-5; } }
protected virtual double MicrosiemensTolerance { get { return 1e-5; } }
+ protected virtual double MillimhosTolerance { get { return 1e-5; } }
protected virtual double MillisiemensTolerance { get { return 1e-5; } }
+ protected virtual double NanomhosTolerance { get { return 1e-5; } }
protected virtual double NanosiemensTolerance { get { return 1e-5; } }
protected virtual double SiemensTolerance { get { return 1e-5; } }
+ protected virtual double TeramhosTolerance { get { return 1e-5; } }
+ protected virtual double TerasiemensTolerance { get { return 1e-5; } }
// ReSharper restore VirtualMemberNeverOverriden.Global
protected (double UnitsInBaseUnit, double Tolerence) GetConversionFactor(ElectricAdmittanceUnit unit)
{
return unit switch
{
+ ElectricAdmittanceUnit.Gigamho => (GigamhosInOneSiemens, GigamhosTolerance),
+ ElectricAdmittanceUnit.Gigasiemens => (GigasiemensInOneSiemens, GigasiemensTolerance),
+ ElectricAdmittanceUnit.Kilomho => (KilomhosInOneSiemens, KilomhosTolerance),
+ ElectricAdmittanceUnit.Kilosiemens => (KilosiemensInOneSiemens, KilosiemensTolerance),
+ ElectricAdmittanceUnit.Megamho => (MegamhosInOneSiemens, MegamhosTolerance),
+ ElectricAdmittanceUnit.Megasiemens => (MegasiemensInOneSiemens, MegasiemensTolerance),
+ ElectricAdmittanceUnit.Mho => (MhosInOneSiemens, MhosTolerance),
+ ElectricAdmittanceUnit.Micromho => (MicromhosInOneSiemens, MicromhosTolerance),
ElectricAdmittanceUnit.Microsiemens => (MicrosiemensInOneSiemens, MicrosiemensTolerance),
+ ElectricAdmittanceUnit.Millimho => (MillimhosInOneSiemens, MillimhosTolerance),
ElectricAdmittanceUnit.Millisiemens => (MillisiemensInOneSiemens, MillisiemensTolerance),
+ ElectricAdmittanceUnit.Nanomho => (NanomhosInOneSiemens, NanomhosTolerance),
ElectricAdmittanceUnit.Nanosiemens => (NanosiemensInOneSiemens, NanosiemensTolerance),
ElectricAdmittanceUnit.Siemens => (SiemensInOneSiemens, SiemensTolerance),
+ ElectricAdmittanceUnit.Teramho => (TeramhosInOneSiemens, TeramhosTolerance),
+ ElectricAdmittanceUnit.Terasiemens => (TerasiemensInOneSiemens, TerasiemensTolerance),
_ => throw new NotSupportedException()
};
}
public static IEnumerable