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..dbae9f5322 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..bf75404c0e 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..93e751c9f1
--- /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": -1
+ },
+ "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..2de036c3eb 100644
--- a/Common/UnitDefinitions/ReactiveEnergy.json
+++ b/Common/UnitDefinitions/ReactiveEnergy.json
@@ -2,6 +2,8 @@
"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,
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 1e027e9e4c..71b06492d6 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,
+ "Gigamho": 7,
+ "Gigasiemens": 14,
+ "Kilomho": 11,
+ "Kilosiemens": 9,
+ "Megamho": 8,
+ "Megasiemens": 6,
+ "Mho": 13,
+ "Micromho": 5,
+ "Millimho": 10,
+ "Nanomho": 12,
+ "Teramho": 19,
+ "Terasiemens": 16
},
"ElectricCharge": {
"AmpereHour": 1,
@@ -282,7 +294,18 @@
"Millisiemens": 2,
"Siemens": 3,
"Kilosiemens": 6,
- "Nanosiemens": 10
+ "Nanosiemens": 10,
+ "Gigamho": 15,
+ "Gigasiemens": 5,
+ "Kilomho": 7,
+ "Megamho": 13,
+ "Megasiemens": 12,
+ "Mho": 9,
+ "Micromho": 11,
+ "Millimho": 8,
+ "Nanomho": 4,
+ "Teramho": 14,
+ "Terasiemens": 17
},
"ElectricConductivity": {
"SiemensPerFoot": 1,
@@ -378,7 +401,8 @@
"Microohm": 4,
"Milliohm": 5,
"Ohm": 6,
- "Teraohm": 12
+ "Teraohm": 12,
+ "Nanoohm": 14
},
"ElectricResistivity": {
"KiloohmCentimeter": 1,
@@ -1870,5 +1894,76 @@
"SquareMeterDegreeCelsiusPerWatt": 3,
"SquareMeterKelvinPerKilowatt": 5,
"SquareMeterKelvinPerWatt": 4
+ },
+ "ElectricApparentEnergy": {
+ "KilovoltampereHour": 1,
+ "MegavoltampereHour": 2,
+ "VoltampereHour": 3
+ },
+ "ElectricApparentPower": {
+ "Gigavoltampere": 9,
+ "Kilovoltampere": 3,
+ "Megavoltampere": 8,
+ "Microvoltampere": 5,
+ "Millivoltampere": 7,
+ "Voltampere": 1
+ },
+ "ElectricCapacitance": {
+ "Farad": 5,
+ "Kilofarad": 7,
+ "Megafarad": 4,
+ "Microfarad": 6,
+ "Millifarad": 10,
+ "Nanofarad": 9,
+ "Picofarad": 8
+ },
+ "ElectricImpedance": {
+ "Gigaohm": 10,
+ "Kiloohm": 6,
+ "Megaohm": 7,
+ "Microohm": 2,
+ "Milliohm": 1,
+ "Nanoohm": 4,
+ "Ohm": 9,
+ "Teraohm": 8
+ },
+ "ElectricReactance": {
+ "Gigaohm": 3,
+ "Kiloohm": 8,
+ "Megaohm": 10,
+ "Microohm": 7,
+ "Milliohm": 4,
+ "Nanoohm": 2,
+ "Ohm": 1,
+ "Teraohm": 5
+ },
+ "ElectricReactiveEnergy": {
+ "KilovoltampereReactiveHour": 9,
+ "MegavoltampereReactiveHour": 7,
+ "VoltampereReactiveHour": 6
+ },
+ "ElectricReactivePower": {
+ "GigavoltampereReactive": 3,
+ "KilovoltampereReactive": 8,
+ "MegavoltampereReactive": 5,
+ "VoltampereReactive": 2
+ },
+ "ElectricSusceptance": {
+ "Gigamho": 4,
+ "Gigasiemens": 5,
+ "Kilomho": 8,
+ "Kilosiemens": 9,
+ "Megamho": 10,
+ "Megasiemens": 6,
+ "Mho": 2,
+ "Micromho": 3,
+ "Microsiemens": 1,
+ "Millimho": 7,
+ "Millisiemens": 16,
+ "Nanomho": 13,
+ "Nanosiemens": 20,
+ "Siemens": 15,
+ "Teramho": 18,
+ "Terasiemens": 17
}
}
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..4d4ac89400
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricApparentEnergy
+ 6.0.0-pre012
+ 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..bfcdc280a1
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricApparentPower
+ 6.0.0-pre012
+ 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..5cd2b19356
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricCapacitance
+ 6.0.0-pre012
+ 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..e6ab62d5d3
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricImpedance
+ 6.0.0-pre012
+ 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..5b46e0824e
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricReactance
+ 6.0.0-pre012
+ 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..051a514c30
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricReactiveEnergy
+ 6.0.0-pre012
+ 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..8ce61af7e2
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricReactivePower
+ 6.0.0-pre012
+ 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..1a240f04fc
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.ElectricSusceptance
+ 6.0.0-pre012
+ 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 f44f365c30..95494e5cca 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 f473beda05..ff465dbb2e 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 f0453dcd61..989b6b3868 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 7fababbad1..93b1ed8c6d 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
{
///
@@ -78,16 +82,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
///
@@ -98,20 +152,80 @@ 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 .
+ ///
+ public static ElectricAdmittance FromGigamhos(double gigamhos) => new ElectricAdmittance(gigamhos, ElectricAdmittanceUnit.Gigamho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromGigasiemens(double gigasiemens) => new ElectricAdmittance(gigasiemens, ElectricAdmittanceUnit.Gigasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromKilomhos(double kilomhos) => new ElectricAdmittance(kilomhos, ElectricAdmittanceUnit.Kilomho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromKilosiemens(double kilosiemens) => new ElectricAdmittance(kilosiemens, ElectricAdmittanceUnit.Kilosiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromMegamhos(double megamhos) => new ElectricAdmittance(megamhos, ElectricAdmittanceUnit.Megamho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromMegasiemens(double megasiemens) => new ElectricAdmittance(megasiemens, ElectricAdmittanceUnit.Megasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromMhos(double mhos) => new ElectricAdmittance(mhos, ElectricAdmittanceUnit.Mho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromMicromhos(double micromhos) => new ElectricAdmittance(micromhos, ElectricAdmittanceUnit.Micromho);
+
///
/// Creates a from .
///
public static ElectricAdmittance FromMicrosiemens(double microsiemens) => new ElectricAdmittance(microsiemens, ElectricAdmittanceUnit.Microsiemens);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromMillimhos(double millimhos) => new ElectricAdmittance(millimhos, ElectricAdmittanceUnit.Millimho);
+
///
/// Creates a from .
///
public static ElectricAdmittance FromMillisiemens(double millisiemens) => new ElectricAdmittance(millisiemens, ElectricAdmittanceUnit.Millisiemens);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromNanomhos(double nanomhos) => new ElectricAdmittance(nanomhos, ElectricAdmittanceUnit.Nanomho);
+
///
/// Creates a from .
///
@@ -122,6 +236,16 @@ public ElectricAdmittance(double value, ElectricAdmittanceUnit unit)
///
public static ElectricAdmittance FromSiemens(double siemens) => new ElectricAdmittance(siemens, ElectricAdmittanceUnit.Siemens);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromTeramhos(double teramhos) => new ElectricAdmittance(teramhos, ElectricAdmittanceUnit.Teramho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricAdmittance FromTerasiemens(double terasiemens) => new ElectricAdmittance(terasiemens, ElectricAdmittanceUnit.Terasiemens);
+
///
/// Dynamically convert from value and unit enum to .
///
@@ -162,10 +286,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.")
};
}
@@ -179,10 +315,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..dda656ec98
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs
@@ -0,0 +1,181 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricApparentEnergy FromKilovoltampereHours(double kilovoltamperehours) => new ElectricApparentEnergy(kilovoltamperehours, ElectricApparentEnergyUnit.KilovoltampereHour);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricApparentEnergy FromMegavoltampereHours(double megavoltamperehours) => new ElectricApparentEnergy(megavoltamperehours, ElectricApparentEnergyUnit.MegavoltampereHour);
+
+ ///
+ /// Creates a from .
+ ///
+ 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..43111343ea
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs
@@ -0,0 +1,220 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricApparentPower FromGigavoltamperes(double gigavoltamperes) => new ElectricApparentPower(gigavoltamperes, ElectricApparentPowerUnit.Gigavoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricApparentPower FromKilovoltamperes(double kilovoltamperes) => new ElectricApparentPower(kilovoltamperes, ElectricApparentPowerUnit.Kilovoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricApparentPower FromMegavoltamperes(double megavoltamperes) => new ElectricApparentPower(megavoltamperes, ElectricApparentPowerUnit.Megavoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricApparentPower FromMicrovoltamperes(double microvoltamperes) => new ElectricApparentPower(microvoltamperes, ElectricApparentPowerUnit.Microvoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricApparentPower FromMillivoltamperes(double millivoltamperes) => new ElectricApparentPower(millivoltamperes, ElectricApparentPowerUnit.Millivoltampere);
+
+ ///
+ /// Creates a from .
+ ///
+ 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..636e11ea34
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs
@@ -0,0 +1,232 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricCapacitance FromFarads(double farads) => new ElectricCapacitance(farads, ElectricCapacitanceUnit.Farad);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricCapacitance FromKilofarads(double kilofarads) => new ElectricCapacitance(kilofarads, ElectricCapacitanceUnit.Kilofarad);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricCapacitance FromMegafarads(double megafarads) => new ElectricCapacitance(megafarads, ElectricCapacitanceUnit.Megafarad);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricCapacitance FromMicrofarads(double microfarads) => new ElectricCapacitance(microfarads, ElectricCapacitanceUnit.Microfarad);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricCapacitance FromMillifarads(double millifarads) => new ElectricCapacitance(millifarads, ElectricCapacitanceUnit.Millifarad);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricCapacitance FromNanofarads(double nanofarads) => new ElectricCapacitance(nanofarads, ElectricCapacitanceUnit.Nanofarad);
+
+ ///
+ /// Creates a from .
+ ///
+ 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 c2fab8b889..930aa75ffa 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
@@ -81,21 +81,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
///
@@ -106,25 +151,80 @@ 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 .
+ ///
+ public static ElectricConductance FromGigamhos(double gigamhos) => new ElectricConductance(gigamhos, ElectricConductanceUnit.Gigamho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromGigasiemens(double gigasiemens) => new ElectricConductance(gigasiemens, ElectricConductanceUnit.Gigasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromKilomhos(double kilomhos) => new ElectricConductance(kilomhos, ElectricConductanceUnit.Kilomho);
+
///
/// Creates a from .
///
public static ElectricConductance FromKilosiemens(double kilosiemens) => new ElectricConductance(kilosiemens, ElectricConductanceUnit.Kilosiemens);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromMegamhos(double megamhos) => new ElectricConductance(megamhos, ElectricConductanceUnit.Megamho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromMegasiemens(double megasiemens) => new ElectricConductance(megasiemens, ElectricConductanceUnit.Megasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromMhos(double mhos) => new ElectricConductance(mhos, ElectricConductanceUnit.Mho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromMicromhos(double micromhos) => new ElectricConductance(micromhos, ElectricConductanceUnit.Micromho);
+
///
/// Creates a from .
///
public static ElectricConductance FromMicrosiemens(double microsiemens) => new ElectricConductance(microsiemens, ElectricConductanceUnit.Microsiemens);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromMillimhos(double millimhos) => new ElectricConductance(millimhos, ElectricConductanceUnit.Millimho);
+
///
/// Creates a from .
///
public static ElectricConductance FromMillisiemens(double millisiemens) => new ElectricConductance(millisiemens, ElectricConductanceUnit.Millisiemens);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromNanomhos(double nanomhos) => new ElectricConductance(nanomhos, ElectricConductanceUnit.Nanomho);
+
///
/// Creates a from .
///
@@ -135,6 +235,16 @@ public ElectricConductance(double value, ElectricConductanceUnit unit)
///
public static ElectricConductance FromSiemens(double siemens) => new ElectricConductance(siemens, ElectricConductanceUnit.Siemens);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromTeramhos(double teramhos) => new ElectricConductance(teramhos, ElectricConductanceUnit.Teramho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricConductance FromTerasiemens(double terasiemens) => new ElectricConductance(terasiemens, ElectricConductanceUnit.Terasiemens);
+
///
/// Dynamically convert from value and unit enum to .
///
@@ -175,11 +285,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.")
};
}
@@ -193,11 +314,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 e43a59993d..85be63dfd2 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..9aa504f3fa
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs
@@ -0,0 +1,245 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricImpedance FromGigaohms(double gigaohms) => new ElectricImpedance(gigaohms, ElectricImpedanceUnit.Gigaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricImpedance FromKiloohms(double kiloohms) => new ElectricImpedance(kiloohms, ElectricImpedanceUnit.Kiloohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricImpedance FromMegaohms(double megaohms) => new ElectricImpedance(megaohms, ElectricImpedanceUnit.Megaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricImpedance FromMicroohms(double microohms) => new ElectricImpedance(microohms, ElectricImpedanceUnit.Microohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricImpedance FromMilliohms(double milliohms) => new ElectricImpedance(milliohms, ElectricImpedanceUnit.Milliohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricImpedance FromNanoohms(double nanoohms) => new ElectricImpedance(nanoohms, ElectricImpedanceUnit.Nanoohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricImpedance FromOhms(double ohms) => new ElectricImpedance(ohms, ElectricImpedanceUnit.Ohm);
+
+ ///
+ /// Creates a from .
+ ///
+ 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 e07625718d..eb87fd5730 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 7977b80791..f4a6166263 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 591c98621e..2b66d5c1e5 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..0b3394d6fc
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs
@@ -0,0 +1,244 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricReactance FromGigaohms(double gigaohms) => new ElectricReactance(gigaohms, ElectricReactanceUnit.Gigaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactance FromKiloohms(double kiloohms) => new ElectricReactance(kiloohms, ElectricReactanceUnit.Kiloohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactance FromMegaohms(double megaohms) => new ElectricReactance(megaohms, ElectricReactanceUnit.Megaohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactance FromMicroohms(double microohms) => new ElectricReactance(microohms, ElectricReactanceUnit.Microohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactance FromMilliohms(double milliohms) => new ElectricReactance(milliohms, ElectricReactanceUnit.Milliohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactance FromNanoohms(double nanoohms) => new ElectricReactance(nanoohms, ElectricReactanceUnit.Nanoohm);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactance FromOhms(double ohms) => new ElectricReactance(ohms, ElectricReactanceUnit.Ohm);
+
+ ///
+ /// Creates a from .
+ ///
+ 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..b9f634d877
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs
@@ -0,0 +1,181 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricReactiveEnergy FromKilovoltampereReactiveHours(double kilovoltamperereactivehours) => new ElectricReactiveEnergy(kilovoltamperereactivehours, ElectricReactiveEnergyUnit.KilovoltampereReactiveHour);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactiveEnergy FromMegavoltampereReactiveHours(double megavoltamperereactivehours) => new ElectricReactiveEnergy(megavoltamperereactivehours, ElectricReactiveEnergyUnit.MegavoltampereReactiveHour);
+
+ ///
+ /// Creates a from .
+ ///
+ 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..ea8a4ebba9
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs
@@ -0,0 +1,196 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricReactivePower FromGigavoltamperesReactive(double gigavoltamperesreactive) => new ElectricReactivePower(gigavoltamperesreactive, ElectricReactivePowerUnit.GigavoltampereReactive);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactivePower FromKilovoltamperesReactive(double kilovoltamperesreactive) => new ElectricReactivePower(kilovoltamperesreactive, ElectricReactivePowerUnit.KilovoltampereReactive);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricReactivePower FromMegavoltamperesReactive(double megavoltamperesreactive) => new ElectricReactivePower(megavoltamperesreactive, ElectricReactivePowerUnit.MegavoltampereReactive);
+
+ ///
+ /// Creates a from .
+ ///
+ 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 a58a374898..1a4badddc5 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
{
///
@@ -103,6 +106,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
///
@@ -142,6 +150,11 @@ public ElectricResistance(double value, ElectricResistanceUnit unit)
///
public static ElectricResistance FromMilliohms(double milliohms) => new ElectricResistance(milliohms, ElectricResistanceUnit.Milliohm);
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricResistance FromNanoohms(double nanoohms) => new ElectricResistance(nanoohms, ElectricResistanceUnit.Nanoohm);
+
///
/// Creates a from .
///
@@ -197,6 +210,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.")
@@ -217,6 +231,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..f891f370ed
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs
@@ -0,0 +1,340 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+ 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 .
+ ///
+ public static ElectricSusceptance FromGigamhos(double gigamhos) => new ElectricSusceptance(gigamhos, ElectricSusceptanceUnit.Gigamho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromGigasiemens(double gigasiemens) => new ElectricSusceptance(gigasiemens, ElectricSusceptanceUnit.Gigasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromKilomhos(double kilomhos) => new ElectricSusceptance(kilomhos, ElectricSusceptanceUnit.Kilomho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromKilosiemens(double kilosiemens) => new ElectricSusceptance(kilosiemens, ElectricSusceptanceUnit.Kilosiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromMegamhos(double megamhos) => new ElectricSusceptance(megamhos, ElectricSusceptanceUnit.Megamho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromMegasiemens(double megasiemens) => new ElectricSusceptance(megasiemens, ElectricSusceptanceUnit.Megasiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromMhos(double mhos) => new ElectricSusceptance(mhos, ElectricSusceptanceUnit.Mho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromMicromhos(double micromhos) => new ElectricSusceptance(micromhos, ElectricSusceptanceUnit.Micromho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromMicrosiemens(double microsiemens) => new ElectricSusceptance(microsiemens, ElectricSusceptanceUnit.Microsiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromMillimhos(double millimhos) => new ElectricSusceptance(millimhos, ElectricSusceptanceUnit.Millimho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromMillisiemens(double millisiemens) => new ElectricSusceptance(millisiemens, ElectricSusceptanceUnit.Millisiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromNanomhos(double nanomhos) => new ElectricSusceptance(nanomhos, ElectricSusceptanceUnit.Nanomho);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromNanosiemens(double nanosiemens) => new ElectricSusceptance(nanosiemens, ElectricSusceptanceUnit.Nanosiemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromSiemens(double siemens) => new ElectricSusceptance(siemens, ElectricSusceptanceUnit.Siemens);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ElectricSusceptance FromTeramhos(double teramhos) => new ElectricSusceptance(teramhos, ElectricSusceptanceUnit.Teramho);
+
+ ///
+ /// Creates a from .
+ ///
+ 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 e9d83b176c..efcb6f03f4 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 b07759ab78..e8ea54dea7 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..1e5e7c9a0b 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 = 7,
+ Gigasiemens = 14,
+ Kilomho = 11,
+ Kilosiemens = 9,
+ Megamho = 8,
+ Megasiemens = 6,
+ Mho = 13,
+ Micromho = 5,
Microsiemens = 1,
+ Millimho = 10,
Millisiemens = 2,
+ Nanomho = 12,
Nanosiemens = 3,
Siemens = 4,
+ Teramho = 19,
+ Terasiemens = 16,
}
#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..f46ab5ea10
--- /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 = 1,
+ MegavoltampereHour = 2,
+ VoltampereHour = 3,
+ }
+
+ #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..71b500b242
--- /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 = 9,
+ Kilovoltampere = 3,
+ Megavoltampere = 8,
+ Microvoltampere = 5,
+ Millivoltampere = 7,
+ Voltampere = 1,
+ }
+
+ #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..b3b88398f2
--- /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 = 5,
+ Kilofarad = 7,
+ Megafarad = 4,
+ Microfarad = 6,
+ Millifarad = 10,
+ Nanofarad = 9,
+ Picofarad = 8,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricConductanceUnit.g.cs
index f2003b8384..da5b831bde 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 = 15,
+ Gigasiemens = 5,
+ Kilomho = 7,
Kilosiemens = 6,
+ Megamho = 13,
+ Megasiemens = 12,
+ Mho = 9,
+ Micromho = 11,
Microsiemens = 1,
+ Millimho = 8,
Millisiemens = 2,
+ Nanomho = 4,
Nanosiemens = 10,
Siemens = 3,
+ Teramho = 14,
+ Terasiemens = 17,
}
#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..61c6ece8b8
--- /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 = 10,
+ Kiloohm = 6,
+ Megaohm = 7,
+ Microohm = 2,
+ Milliohm = 1,
+ Nanoohm = 4,
+ Ohm = 9,
+ Teraohm = 8,
+ }
+
+ #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..fc88bedac4
--- /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 = 3,
+ Kiloohm = 8,
+ Megaohm = 10,
+ Microohm = 7,
+ Milliohm = 4,
+ Nanoohm = 2,
+ Ohm = 1,
+ Teraohm = 5,
+ }
+
+ #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..92cc518be5
--- /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 = 9,
+ MegavoltampereReactiveHour = 7,
+ VoltampereReactiveHour = 6,
+ }
+
+ #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..5f9c0a59e3
--- /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 = 3,
+ KilovoltampereReactive = 8,
+ MegavoltampereReactive = 5,
+ VoltampereReactive = 2,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricResistanceUnit.g.cs
index 452a17522a..8a17f875f7 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 = 14,
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..b657aec9ce
--- /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 = 4,
+ Gigasiemens = 5,
+ Kilomho = 8,
+ Kilosiemens = 9,
+ Megamho = 10,
+ Megasiemens = 6,
+ Mho = 2,
+ Micromho = 3,
+ Microsiemens = 1,
+ Millimho = 7,
+ Millisiemens = 16,
+ Nanomho = 13,
+ Nanosiemens = 20,
+ Siemens = 15,
+ Teramho = 18,
+ Terasiemens = 17,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
index 1f78a3bc57..5155751a64 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
+++ b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
@@ -40,6 +40,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}"
@@ -56,6 +62,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}"
@@ -66,12 +74,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}"
@@ -368,6 +384,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
@@ -416,6 +450,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
@@ -446,6 +486,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
@@ -464,6 +522,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/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs
index b02da0f9f6..dda9e36911 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricAdmittanceExtensions.g.cs
@@ -32,6 +32,70 @@ namespace UnitsNet.NumberExtensions.NumberToElectricAdmittance
///
public static class NumberToElectricAdmittanceExtensions
{
+ ///
+ public static ElectricAdmittance Gigamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromGigamhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricAdmittance Gigasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromGigasiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricAdmittance Kilomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromKilomhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricAdmittance Kilosiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromKilosiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricAdmittance Megamhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMegamhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricAdmittance Megasiemens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMegasiemens(Convert.ToDouble(value));
+
+ ///
+ public static ElectricAdmittance Mhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMhos(Convert.ToDouble(value));
+
+ ///
+ public static ElectricAdmittance Micromhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMicromhos(Convert.ToDouble(value));
+
///
public static ElectricAdmittance Microsiemens(this T value)
where T : notnull
@@ -40,6 +104,14 @@ public static ElectricAdmittance Microsiemens(this T value)
#endif
=> ElectricAdmittance.FromMicrosiemens(Convert.ToDouble(value));
+ ///
+ public static ElectricAdmittance Millimhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromMillimhos(Convert.ToDouble(value));
+
///
public static ElectricAdmittance Millisiemens(this T value)
where T : notnull
@@ -48,6 +120,14 @@ public static ElectricAdmittance Millisiemens(this T value)
#endif
=> ElectricAdmittance.FromMillisiemens(Convert.ToDouble(value));
+ ///
+ public static ElectricAdmittance Nanomhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromNanomhos(Convert.ToDouble(value));
+
///
public static ElectricAdmittance Nanosiemens(this T value)
where T : notnull
@@ -64,5 +144,21 @@ public static ElectricAdmittance Siemens(this T value)
#endif
=> ElectricAdmittance.FromSiemens(Convert.ToDouble(value));
+ ///
+ public static ElectricAdmittance Teramhos(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricAdmittance.FromTeramhos(Convert.ToDouble(value));
+
+ ///
+ 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..5ca10ac415
--- /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..e044644358
--- /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..fbb35fdb75
--- /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 d656b7462b..44bf79f2d8 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..421dfe5b7d
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricImpedanceExtensions.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.NumberToElectricImpedance
+{
+ ///
+ /// A number to ElectricImpedance Extensions
+ ///
+ public static class NumberToElectricImpedanceExtensions
+ {
+ ///
+ public static ElectricImpedance Gigaohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromGigaohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricImpedance Kiloohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromKiloohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricImpedance Megaohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromMegaohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricImpedance Microohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromMicroohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricImpedance Milliohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromMilliohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricImpedance Nanoohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromNanoohms(Convert.ToDouble(value));
+
+ ///
+ public static ElectricImpedance Ohms(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => ElectricImpedance.FromOhms(Convert.ToDouble(value));
+
+ ///
+ 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/NumberToElectricReactanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToElectricReactanceExtensions.g.cs
new file mode 100644
index 0000000000..8c0cb0cb64
--- /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..497204c397
--- /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..0e998e2520
--- /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 99e17110cf..7661e6b62e 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..7cbb2eca44
--- /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.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 25f186ef56..85f7fc82be 100644
--- a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
@@ -52,23 +52,31 @@ void Assertion(int expectedValue, Enum expectedUnit, IQuantity quantity)
Assertion(3, DensityUnit.TonnePerCubicMillimeter, Quantity.From(3, DensityUnit.TonnePerCubicMillimeter));
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));
@@ -183,6 +191,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);
@@ -191,14 +202,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);
@@ -313,6 +329,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);
@@ -321,14 +340,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 f50a20dad0..1ee9d98ae6 100644
--- a/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/ElectricAdmittanceTestsBase.g.cs
@@ -38,36 +38,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