diff --git a/Common/UnitDefinitions/RadiationExposure.json b/Common/UnitDefinitions/RadiationExposure.json
new file mode 100644
index 0000000000..6684939d72
--- /dev/null
+++ b/Common/UnitDefinitions/RadiationExposure.json
@@ -0,0 +1,49 @@
+{
+ "Name": "RadiationExposure",
+ "BaseUnit": "CoulombPerKilogram",
+ "XmlDocSummary": "Radiation exposure is a measure of the ionization of air due to ionizing radiation from photons.",
+ "XmlDocsRemarks": "https://en.wikipedia.org/wiki/Radiation_exposure",
+ "BaseDimensions": {
+ "M": -1,
+ "T": 1,
+ "I": 1
+ },
+ "Units": [
+ {
+ "SingularName": "CoulombPerKilogram",
+ "PluralName": "CoulombsPerKilogram",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
+ "Prefixes": [ "Pico", "Nano", "Micro", "Milli" ],
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "C/kg" ]
+ }
+ ]
+ },
+ {
+ "SingularName": "Roentgen",
+ "PluralName": "Roentgens",
+ "FromUnitToBaseFunc": "{x} * 2.58e-4",
+ "FromBaseToUnitFunc": "{x} / 2.58e-4",
+ "Prefixes": [ "Micro", "Milli" ],
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
+ "Localization": [
+ {
+ "Culture": "en-US",
+ "Abbreviations": [ "R" ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Common/UnitEnumValues.g.json b/Common/UnitEnumValues.g.json
index 5bc81f4e52..4d909db5bb 100644
--- a/Common/UnitEnumValues.g.json
+++ b/Common/UnitEnumValues.g.json
@@ -1825,5 +1825,15 @@
"Picobecquerel": 36,
"Picocurie": 35,
"Picorutherford": 25
+ },
+ "RadiationExposure": {
+ "CoulombPerKilogram": 10,
+ "MicrocoulombPerKilogram": 3,
+ "MillicoulombPerKilogram": 2,
+ "NanocoulombPerKilogram": 6,
+ "PicocoulombPerKilogram": 5,
+ "Roentgen": 4,
+ "Microroentgen": 12,
+ "Milliroentgen": 13
}
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs
new file mode 100644
index 0000000000..73ea4a7735
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs
@@ -0,0 +1,250 @@
+//------------------------------------------------------------------------------
+//
+// 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
+{
+ ///
+ ///
+ /// Radiation exposure is a measure of the ionization of air due to ionizing radiation from photons.
+ ///
+ public struct RadiationExposure
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly RadiationExposureUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public RadiationExposureUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ /// If value is NaN or Infinity.
+ public RadiationExposure(double value, RadiationExposureUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of Duration, which is Second. All conversions go via this value.
+ ///
+ public static RadiationExposureUnit BaseUnit { get; } = RadiationExposureUnit.CoulombPerKilogram;
+
+ ///
+ /// Represents the largest possible value of Duration
+ ///
+ public static RadiationExposure MaxValue { get; } = new RadiationExposure(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of Duration
+ ///
+ public static RadiationExposure MinValue { get; } = new RadiationExposure(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static RadiationExposure Zero { get; } = new RadiationExposure(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double CoulombsPerKilogram => As(RadiationExposureUnit.CoulombPerKilogram);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double MicrocoulombsPerKilogram => As(RadiationExposureUnit.MicrocoulombPerKilogram);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Microroentgens => As(RadiationExposureUnit.Microroentgen);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double MillicoulombsPerKilogram => As(RadiationExposureUnit.MillicoulombPerKilogram);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Milliroentgens => As(RadiationExposureUnit.Milliroentgen);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double NanocoulombsPerKilogram => As(RadiationExposureUnit.NanocoulombPerKilogram);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double PicocoulombsPerKilogram => As(RadiationExposureUnit.PicocoulombPerKilogram);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double Roentgens => As(RadiationExposureUnit.Roentgen);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromCoulombsPerKilogram(double coulombsperkilogram) => new RadiationExposure(coulombsperkilogram, RadiationExposureUnit.CoulombPerKilogram);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromMicrocoulombsPerKilogram(double microcoulombsperkilogram) => new RadiationExposure(microcoulombsperkilogram, RadiationExposureUnit.MicrocoulombPerKilogram);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromMicroroentgens(double microroentgens) => new RadiationExposure(microroentgens, RadiationExposureUnit.Microroentgen);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromMillicoulombsPerKilogram(double millicoulombsperkilogram) => new RadiationExposure(millicoulombsperkilogram, RadiationExposureUnit.MillicoulombPerKilogram);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromMilliroentgens(double milliroentgens) => new RadiationExposure(milliroentgens, RadiationExposureUnit.Milliroentgen);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromNanocoulombsPerKilogram(double nanocoulombsperkilogram) => new RadiationExposure(nanocoulombsperkilogram, RadiationExposureUnit.NanocoulombPerKilogram);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromPicocoulombsPerKilogram(double picocoulombsperkilogram) => new RadiationExposure(picocoulombsperkilogram, RadiationExposureUnit.PicocoulombPerKilogram);
+
+ ///
+ /// Creates a from .
+ ///
+ /// If value is NaN or Infinity.
+ public static RadiationExposure FromRoentgens(double roentgens) => new RadiationExposure(roentgens, RadiationExposureUnit.Roentgen);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// RadiationExposure unit value.
+ public static RadiationExposure From(double value, RadiationExposureUnit fromUnit)
+ {
+ return new RadiationExposure(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(RadiationExposureUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this Duration to another Duration with the unit representation .
+ ///
+ /// A Duration with the specified unit.
+ public RadiationExposure ToUnit(RadiationExposureUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new RadiationExposure(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
+ {
+ RadiationExposureUnit.CoulombPerKilogram => _value,
+ RadiationExposureUnit.MicrocoulombPerKilogram => (_value) * 1e-6d,
+ RadiationExposureUnit.Microroentgen => (_value * 2.58e-4) * 1e-6d,
+ RadiationExposureUnit.MillicoulombPerKilogram => (_value) * 1e-3d,
+ RadiationExposureUnit.Milliroentgen => (_value * 2.58e-4) * 1e-3d,
+ RadiationExposureUnit.NanocoulombPerKilogram => (_value) * 1e-9d,
+ RadiationExposureUnit.PicocoulombPerKilogram => (_value) * 1e-12d,
+ RadiationExposureUnit.Roentgen => _value * 2.58e-4,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(RadiationExposureUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ RadiationExposureUnit.CoulombPerKilogram => baseUnitValue,
+ RadiationExposureUnit.MicrocoulombPerKilogram => (baseUnitValue) / 1e-6d,
+ RadiationExposureUnit.Microroentgen => (baseUnitValue / 2.58e-4) / 1e-6d,
+ RadiationExposureUnit.MillicoulombPerKilogram => (baseUnitValue) / 1e-3d,
+ RadiationExposureUnit.Milliroentgen => (baseUnitValue / 2.58e-4) / 1e-3d,
+ RadiationExposureUnit.NanocoulombPerKilogram => (baseUnitValue) / 1e-9d,
+ RadiationExposureUnit.PicocoulombPerKilogram => (baseUnitValue) / 1e-12d,
+ RadiationExposureUnit.Roentgen => baseUnitValue / 2.58e-4,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/RadiationExposure.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/RadiationExposure.nfproj
new file mode 100644
index 0000000000..f2b96d78df
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/RadiationExposure.nfproj
@@ -0,0 +1,42 @@
+
+
+
+ $(MSBuildExtensionsPath)\nanoFramework\v1.0\
+
+
+
+ Debug
+ AnyCPU
+ {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {69b383c7-828a-1857-cbe2-f11b9ba77320}
+ Library
+ Properties
+ 512
+ UnitsNet
+ UnitsNet.RadiationExposure
+ v1.0
+ bin\$(Configuration)\$(AssemblyName).xml
+
+
+
+
+
+
+
+
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
+ True
+ True
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec
new file mode 100644
index 0000000000..470443e550
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ UnitsNet.nanoFramework.RadiationExposure
+ 5.41.0
+ Units.NET RadiationExposure - nanoFramework
+ Andreas Gullberg Larsen,nanoframework
+ UnitsNet
+ MIT
+ https://github.com/angularsen/UnitsNet
+ false
+ Adds RadiationExposure 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 radiationexposure unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+
+
+
+
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/RadiationExposureUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/RadiationExposureUnit.g.cs
new file mode 100644
index 0000000000..8e50cdd24f
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/RadiationExposureUnit.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 RadiationExposureUnit
+ {
+ CoulombPerKilogram = 10,
+ MicrocoulombPerKilogram = 3,
+ Microroentgen = 12,
+ MillicoulombPerKilogram = 2,
+ Milliroentgen = 13,
+ NanocoulombPerKilogram = 6,
+ PicocoulombPerKilogram = 5,
+ Roentgen = 4,
+ }
+
+ #pragma warning restore 1591
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
index ce672dd107..4ae1dab440 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
+++ b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
@@ -170,6 +170,8 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Pressure", "Pressure\Pressu
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "PressureChangeRate", "PressureChangeRate\PressureChangeRate.nfproj", "{c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}"
EndProject
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "RadiationExposure", "RadiationExposure\RadiationExposure.nfproj", "{69b383c7-828a-1857-cbe2-f11b9ba77320}"
+EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Radioactivity", "Radioactivity\Radioactivity.nfproj", "{abf4b42f-e999-2a78-403f-fb09524f186a}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Ratio", "Ratio\Ratio.nfproj", "{b0be4813-d93e-7b06-d422-23ca28adf22a}"
@@ -756,6 +758,12 @@ Global
{c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}.Release|Any CPU.ActiveCfg = Release|Any CPU
{c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}.Release|Any CPU.Build.0 = Release|Any CPU
{c9e4cfa9-c5d3-5e9d-243c-106ba4b6a447}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{69b383c7-828a-1857-cbe2-f11b9ba77320}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{69b383c7-828a-1857-cbe2-f11b9ba77320}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{69b383c7-828a-1857-cbe2-f11b9ba77320}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{69b383c7-828a-1857-cbe2-f11b9ba77320}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{69b383c7-828a-1857-cbe2-f11b9ba77320}.Release|Any CPU.Build.0 = Release|Any CPU
+{69b383c7-828a-1857-cbe2-f11b9ba77320}.Release|Any CPU.Deploy.0 = Release|Any CPU
{abf4b42f-e999-2a78-403f-fb09524f186a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{abf4b42f-e999-2a78-403f-fb09524f186a}.Debug|Any CPU.Build.0 = Debug|Any CPU
{abf4b42f-e999-2a78-403f-fb09524f186a}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRadiationExposureExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRadiationExposureExtensionsTest.g.cs
new file mode 100644
index 0000000000..e8906260d3
--- /dev/null
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToRadiationExposureExtensionsTest.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.NumberToRadiationExposure;
+using Xunit;
+
+namespace UnitsNet.Tests
+{
+ public class NumberToRadiationExposureExtensionsTests
+ {
+ [Fact]
+ public void NumberToCoulombsPerKilogramTest() =>
+ Assert.Equal(RadiationExposure.FromCoulombsPerKilogram(2), 2.CoulombsPerKilogram());
+
+ [Fact]
+ public void NumberToMicrocoulombsPerKilogramTest() =>
+ Assert.Equal(RadiationExposure.FromMicrocoulombsPerKilogram(2), 2.MicrocoulombsPerKilogram());
+
+ [Fact]
+ public void NumberToMicroroentgensTest() =>
+ Assert.Equal(RadiationExposure.FromMicroroentgens(2), 2.Microroentgens());
+
+ [Fact]
+ public void NumberToMillicoulombsPerKilogramTest() =>
+ Assert.Equal(RadiationExposure.FromMillicoulombsPerKilogram(2), 2.MillicoulombsPerKilogram());
+
+ [Fact]
+ public void NumberToMilliroentgensTest() =>
+ Assert.Equal(RadiationExposure.FromMilliroentgens(2), 2.Milliroentgens());
+
+ [Fact]
+ public void NumberToNanocoulombsPerKilogramTest() =>
+ Assert.Equal(RadiationExposure.FromNanocoulombsPerKilogram(2), 2.NanocoulombsPerKilogram());
+
+ [Fact]
+ public void NumberToPicocoulombsPerKilogramTest() =>
+ Assert.Equal(RadiationExposure.FromPicocoulombsPerKilogram(2), 2.PicocoulombsPerKilogram());
+
+ [Fact]
+ public void NumberToRoentgensTest() =>
+ Assert.Equal(RadiationExposure.FromRoentgens(2), 2.Roentgens());
+
+ }
+}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationExposureExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationExposureExtensions.g.cs
new file mode 100644
index 0000000000..d24f2b7f0a
--- /dev/null
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToRadiationExposureExtensions.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.NumberToRadiationExposure
+{
+ ///
+ /// A number to RadiationExposure Extensions
+ ///
+ public static class NumberToRadiationExposureExtensions
+ {
+ ///
+ public static RadiationExposure CoulombsPerKilogram(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromCoulombsPerKilogram(Convert.ToDouble(value));
+
+ ///
+ public static RadiationExposure MicrocoulombsPerKilogram(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromMicrocoulombsPerKilogram(Convert.ToDouble(value));
+
+ ///
+ public static RadiationExposure Microroentgens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromMicroroentgens(Convert.ToDouble(value));
+
+ ///
+ public static RadiationExposure MillicoulombsPerKilogram(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromMillicoulombsPerKilogram(Convert.ToDouble(value));
+
+ ///
+ public static RadiationExposure Milliroentgens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromMilliroentgens(Convert.ToDouble(value));
+
+ ///
+ public static RadiationExposure NanocoulombsPerKilogram(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromNanocoulombsPerKilogram(Convert.ToDouble(value));
+
+ ///
+ public static RadiationExposure PicocoulombsPerKilogram(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromPicocoulombsPerKilogram(Convert.ToDouble(value));
+
+ ///
+ public static RadiationExposure Roentgens(this T value)
+ where T : notnull
+#if NET7_0_OR_GREATER
+ , INumber
+#endif
+ => RadiationExposure.FromRoentgens(Convert.ToDouble(value));
+
+ }
+}
diff --git a/UnitsNet.Tests/CustomCode/RadiationExposureTests.cs b/UnitsNet.Tests/CustomCode/RadiationExposureTests.cs
new file mode 100644
index 0000000000..19b52baf95
--- /dev/null
+++ b/UnitsNet.Tests/CustomCode/RadiationExposureTests.cs
@@ -0,0 +1,20 @@
+// 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 RadiationExposureTests : RadiationExposureTestsBase
+ {
+ protected override bool SupportsSIUnitSystem => true;
+ protected override double CoulombsPerKilogramInOneCoulombPerKilogram => 1;
+ protected override double MillicoulombsPerKilogramInOneCoulombPerKilogram => 1e+3;
+ protected override double MicrocoulombsPerKilogramInOneCoulombPerKilogram => 1e+6;
+ protected override double NanocoulombsPerKilogramInOneCoulombPerKilogram => 1e+9;
+ protected override double PicocoulombsPerKilogramInOneCoulombPerKilogram => 1e+12;
+ protected override double RoentgensInOneCoulombPerKilogram => 3875.9689922;
+ protected override double MilliroentgensInOneCoulombPerKilogram => 3875.9689922e+3;
+ protected override double MicroroentgensInOneCoulombPerKilogram => 3875.9689922e+6;
+ }
+}
diff --git a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
index 9e18cd461c..adfc1e4d48 100644
--- a/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
+++ b/UnitsNet.Tests/GeneratedCode/IQuantityTests.g.cs
@@ -118,6 +118,7 @@ void Assertion(int expectedValue, Enum expectedUnit, IQuantity quantity)
Assertion(3, PowerRatioUnit.DecibelWatt, Quantity.From(3, PowerRatioUnit.DecibelWatt));
Assertion(3, PressureUnit.Torr, Quantity.From(3, PressureUnit.Torr));
Assertion(3, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, Quantity.From(3, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond));
+ Assertion(3, RadiationExposureUnit.Roentgen, Quantity.From(3, RadiationExposureUnit.Roentgen));
Assertion(3, RadioactivityUnit.Terarutherford, Quantity.From(3, RadioactivityUnit.Terarutherford));
Assertion(3, RatioUnit.Percent, Quantity.From(3, RatioUnit.Percent));
Assertion(3, RatioChangeRateUnit.PercentPerSecond, Quantity.From(3, RatioChangeRateUnit.PercentPerSecond));
@@ -247,6 +248,7 @@ public void QuantityInfo_IsSameAsStaticInfoProperty()
Assertion(PowerRatio.Info, PowerRatio.Zero);
Assertion(Pressure.Info, Pressure.Zero);
Assertion(PressureChangeRate.Info, PressureChangeRate.Zero);
+ Assertion(RadiationExposure.Info, RadiationExposure.Zero);
Assertion(Radioactivity.Info, Radioactivity.Zero);
Assertion(Ratio.Info, Ratio.Zero);
Assertion(RatioChangeRate.Info, RatioChangeRate.Zero);
@@ -376,6 +378,7 @@ public void Dimensions_IsSameAsStaticBaseDimensions()
Assertion(PowerRatio.BaseDimensions, PowerRatio.Zero);
Assertion(Pressure.BaseDimensions, Pressure.Zero);
Assertion(PressureChangeRate.BaseDimensions, PressureChangeRate.Zero);
+ Assertion(RadiationExposure.BaseDimensions, RadiationExposure.Zero);
Assertion(Radioactivity.BaseDimensions, Radioactivity.Zero);
Assertion(Ratio.BaseDimensions, Ratio.Zero);
Assertion(RatioChangeRate.BaseDimensions, RatioChangeRate.Zero);
diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationExposureTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationExposureTestsBase.g.cs
new file mode 100644
index 0000000000..31f2bf9527
--- /dev/null
+++ b/UnitsNet.Tests/GeneratedCode/TestsBase/RadiationExposureTestsBase.g.cs
@@ -0,0 +1,890 @@
+//------------------------------------------------------------------------------
+//
+// 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 System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Threading;
+using UnitsNet.Tests.TestsBase;
+using UnitsNet.Units;
+using Xunit;
+
+// Disable build warning CS1718: Comparison made to same variable; did you mean to compare something else?
+#pragma warning disable 1718
+
+// ReSharper disable once CheckNamespace
+namespace UnitsNet.Tests
+{
+ ///
+ /// Test of RadiationExposure.
+ ///
+// ReSharper disable once PartialTypeWithSinglePart
+ public abstract partial class RadiationExposureTestsBase : QuantityTestsBase
+ {
+ protected abstract double CoulombsPerKilogramInOneCoulombPerKilogram { get; }
+ protected abstract double MicrocoulombsPerKilogramInOneCoulombPerKilogram { get; }
+ protected abstract double MicroroentgensInOneCoulombPerKilogram { get; }
+ protected abstract double MillicoulombsPerKilogramInOneCoulombPerKilogram { get; }
+ protected abstract double MilliroentgensInOneCoulombPerKilogram { get; }
+ protected abstract double NanocoulombsPerKilogramInOneCoulombPerKilogram { get; }
+ protected abstract double PicocoulombsPerKilogramInOneCoulombPerKilogram { get; }
+ protected abstract double RoentgensInOneCoulombPerKilogram { get; }
+
+// ReSharper disable VirtualMemberNeverOverriden.Global
+ protected virtual double CoulombsPerKilogramTolerance { get { return 1e-5; } }
+ protected virtual double MicrocoulombsPerKilogramTolerance { get { return 1e-5; } }
+ protected virtual double MicroroentgensTolerance { get { return 1e-5; } }
+ protected virtual double MillicoulombsPerKilogramTolerance { get { return 1e-5; } }
+ protected virtual double MilliroentgensTolerance { get { return 1e-5; } }
+ protected virtual double NanocoulombsPerKilogramTolerance { get { return 1e-5; } }
+ protected virtual double PicocoulombsPerKilogramTolerance { get { return 1e-5; } }
+ protected virtual double RoentgensTolerance { get { return 1e-5; } }
+// ReSharper restore VirtualMemberNeverOverriden.Global
+
+ protected (double UnitsInBaseUnit, double Tolerence) GetConversionFactor(RadiationExposureUnit unit)
+ {
+ return unit switch
+ {
+ RadiationExposureUnit.CoulombPerKilogram => (CoulombsPerKilogramInOneCoulombPerKilogram, CoulombsPerKilogramTolerance),
+ RadiationExposureUnit.MicrocoulombPerKilogram => (MicrocoulombsPerKilogramInOneCoulombPerKilogram, MicrocoulombsPerKilogramTolerance),
+ RadiationExposureUnit.Microroentgen => (MicroroentgensInOneCoulombPerKilogram, MicroroentgensTolerance),
+ RadiationExposureUnit.MillicoulombPerKilogram => (MillicoulombsPerKilogramInOneCoulombPerKilogram, MillicoulombsPerKilogramTolerance),
+ RadiationExposureUnit.Milliroentgen => (MilliroentgensInOneCoulombPerKilogram, MilliroentgensTolerance),
+ RadiationExposureUnit.NanocoulombPerKilogram => (NanocoulombsPerKilogramInOneCoulombPerKilogram, NanocoulombsPerKilogramTolerance),
+ RadiationExposureUnit.PicocoulombPerKilogram => (PicocoulombsPerKilogramInOneCoulombPerKilogram, PicocoulombsPerKilogramTolerance),
+ RadiationExposureUnit.Roentgen => (RoentgensInOneCoulombPerKilogram, RoentgensTolerance),
+ _ => throw new NotSupportedException()
+ };
+ }
+
+ public static IEnumerable