diff --git a/UnitsNet.Serialization.JsonNet.CompatibilityTests/UnitsNet.Serialization.JsonNet.CompatibilityTests.csproj b/UnitsNet.Serialization.JsonNet.CompatibilityTests/UnitsNet.Serialization.JsonNet.CompatibilityTests.csproj
index f216057d85..adb0a2dfc4 100644
--- a/UnitsNet.Serialization.JsonNet.CompatibilityTests/UnitsNet.Serialization.JsonNet.CompatibilityTests.csproj
+++ b/UnitsNet.Serialization.JsonNet.CompatibilityTests/UnitsNet.Serialization.JsonNet.CompatibilityTests.csproj
@@ -4,6 +4,7 @@
netcoreapp2.0
UnitsNet.Serialization.JsonNet.CompatibilityTests
7.3
+ true
diff --git a/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj b/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj
index 4f7084831d..6338155f3a 100644
--- a/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj
+++ b/UnitsNet.Serialization.JsonNet.Tests/UnitsNet.Serialization.JsonNet.Tests.csproj
@@ -4,6 +4,7 @@
netcoreapp2.0
UnitsNet.Serialization.JsonNet.Tests
7.3
+ true
diff --git a/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj b/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj
index 6287bc232b..22bf55d25f 100644
--- a/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj
+++ b/UnitsNet.Serialization.JsonNet/UnitsNet.Serialization.JsonNet.csproj
@@ -20,9 +20,9 @@
4.0.0.0
7.3
- CS1701;CS1702;CS1705;CS0618
UnitsNet.Serialization.JsonNet
netstandard2.0;net40
+ true
diff --git a/UnitsNet.Tests/CustomCode/MolarityTests.cs b/UnitsNet.Tests/CustomCode/MolarityTests.cs
index 7ed60140ab..0b65235b16 100644
--- a/UnitsNet.Tests/CustomCode/MolarityTests.cs
+++ b/UnitsNet.Tests/CustomCode/MolarityTests.cs
@@ -42,7 +42,7 @@ public void ExpectDensityConvertedToMolarityCorrectly()
{
var density = Density.FromKilogramsPerCubicMeter(60.02);
var mw = Mass.FromGrams(58.443);
- var molarity = Molarity.FromDensity(density, mw).MolesPerCubicMeter;
+ var molarity = (density / mw).MolesPerCubicMeter;
AssertEx.EqualTolerance(1026.98355, molarity, MolesPerCubicMeterTolerance);
}
diff --git a/UnitsNet.Tests/QuantityInfoTest.cs b/UnitsNet.Tests/QuantityInfoTest.cs
index 847c5db584..e9075f6303 100644
--- a/UnitsNet.Tests/QuantityInfoTest.cs
+++ b/UnitsNet.Tests/QuantityInfoTest.cs
@@ -24,9 +24,12 @@ public void Constructor_AssignsProperties()
Assert.Equal(expectedZero, info.Zero);
Assert.Equal("Length", info.Name);
+ // Obsolete members
+#pragma warning disable 618
Assert.Equal(expectedUnits, info.Units);
Assert.Equal(expectedBaseUnit, info.BaseUnit);
Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames);
+#pragma warning restore 618
Assert.Equal(expectedQuantityType, info.QuantityType);
Assert.Equal(expectedBaseDimensions, info.BaseDimensions);
}
@@ -44,9 +47,12 @@ public void GenericsConstructor_AssignsProperties()
Assert.Equal(expectedZero, info.Zero);
Assert.Equal("Length", info.Name);
+ // Obsolete members
+#pragma warning disable 618
Assert.Equal(expectedUnits, info.Units);
Assert.Equal(expectedBaseUnit, info.BaseUnit);
Assert.Equal(new[]{"Centimeter", "Kilometer"}, info.UnitNames);
+#pragma warning restore 618
Assert.Equal(expectedQuantityType, info.QuantityType);
Assert.Equal(expectedBaseDimensions, info.BaseDimensions);
}
diff --git a/UnitsNet.Tests/QuantityTest.cs b/UnitsNet.Tests/QuantityTest.cs
index d5038826f3..05017e7262 100644
--- a/UnitsNet.Tests/QuantityTest.cs
+++ b/UnitsNet.Tests/QuantityTest.cs
@@ -52,10 +52,13 @@ public void GetInfo_GivenLength_ReturnsQuantityInfoForLength()
Assert.Equal("Length", quantityInfo.Name);
Assert.Equal(QuantityType.Length, quantityInfo.QuantityType);
+ // Obsolete members
+#pragma warning disable 618
Assert.Superset(knownLengthUnitNames.ToHashSet(), quantityInfo.UnitNames.ToHashSet());
Assert.Superset(knownLengthUnits.ToHashSet(), quantityInfo.Units.ToHashSet());
Assert.Equal(lengthUnitCount, quantityInfo.UnitNames.Length);
Assert.Equal(lengthUnitCount, quantityInfo.Units.Length);
+#pragma warning restore 618
Assert.Equal(typeof(LengthUnit), quantityInfo.UnitType);
Assert.Equal(typeof(Length), quantityInfo.ValueType);
Assert.Equal(Length.Zero, quantityInfo.Zero);
@@ -72,10 +75,13 @@ public void GetInfo_GivenMass_ReturnsQuantityInfoForMass()
Assert.Equal("Mass", quantityInfo.Name);
Assert.Equal(QuantityType.Mass, quantityInfo.QuantityType);
+ // Obsolete members
+#pragma warning disable 618
Assert.Superset(knownMassUnitNames.ToHashSet(), quantityInfo.UnitNames.ToHashSet());
Assert.Superset(knownMassUnits.ToHashSet(), quantityInfo.Units.ToHashSet());
Assert.Equal(massUnitCount, quantityInfo.UnitNames.Length);
Assert.Equal(massUnitCount, quantityInfo.Units.Length);
+#pragma warning restore 618
Assert.Equal(typeof(MassUnit), quantityInfo.UnitType);
Assert.Equal(typeof(Mass), quantityInfo.ValueType);
Assert.Equal(Mass.Zero, quantityInfo.Zero);
diff --git a/UnitsNet.Tests/QuantityTests.cs b/UnitsNet.Tests/QuantityTests.cs
index 538b150fbc..a3f341bee0 100644
--- a/UnitsNet.Tests/QuantityTests.cs
+++ b/UnitsNet.Tests/QuantityTests.cs
@@ -40,13 +40,16 @@ private static void AssertQuantityInfoRepresentsLength(QuantityInfo
{
Assert.Equal(Length.Zero, quantityInfo.Zero);
Assert.Equal("Length", quantityInfo.Name);
-
- var lengthUnits = EnumUtils.GetEnumValues().Except(new[] {LengthUnit.Undefined}).ToArray();
- Assert.Equal(lengthUnits, quantityInfo.Units);
Assert.Equal(QuantityType.Length, quantityInfo.QuantityType);
+ var lengthUnits = EnumUtils.GetEnumValues().Except(new[] {LengthUnit.Undefined}).ToArray();
var lengthUnitNames = lengthUnits.Select(x => x.ToString());
+
+ // Obsolete members
+#pragma warning disable 618
+ Assert.Equal(lengthUnits, quantityInfo.Units);
Assert.Equal(lengthUnitNames, quantityInfo.UnitNames);
+#pragma warning restore 618
}
}
}
diff --git a/UnitsNet.Tests/UnitsNet.Tests.csproj b/UnitsNet.Tests/UnitsNet.Tests.csproj
index f85034390c..6f38a78f1c 100644
--- a/UnitsNet.Tests/UnitsNet.Tests.csproj
+++ b/UnitsNet.Tests/UnitsNet.Tests.csproj
@@ -3,8 +3,8 @@
netcoreapp2.0
UnitsNet.Tests
- CS1701;CS1702;CS1705;CS0618
7.3
+ true
@@ -25,4 +25,4 @@
-
\ No newline at end of file
+
diff --git a/UnitsNet.WindowsRuntimeComponent/UnitsNet.WindowsRuntimeComponent.csproj b/UnitsNet.WindowsRuntimeComponent/UnitsNet.WindowsRuntimeComponent.csproj
index 289c256d98..d7ee6c8860 100644
--- a/UnitsNet.WindowsRuntimeComponent/UnitsNet.WindowsRuntimeComponent.csproj
+++ b/UnitsNet.WindowsRuntimeComponent/UnitsNet.WindowsRuntimeComponent.csproj
@@ -18,7 +18,6 @@
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
false
..\Artifacts\UnitsNet.WindowsRuntimeComponent
- CS1701;CS1702;CS1705;CS0618;CS0809;CS1591
7.3
@@ -135,4 +134,4 @@
-->
-
\ No newline at end of file
+
diff --git a/UnitsNet.sln.DotSettings b/UnitsNet.sln.DotSettings
index 24c2bb4399..40954ed83d 100644
--- a/UnitsNet.sln.DotSettings
+++ b/UnitsNet.sln.DotSettings
@@ -16,4 +16,5 @@
True
True
True
- True
+ True
+ True
diff --git a/UnitsNet/BaseUnits.cs b/UnitsNet/BaseUnits.cs
index 14edf7ef3c..01db20e5f2 100644
--- a/UnitsNet/BaseUnits.cs
+++ b/UnitsNet/BaseUnits.cs
@@ -7,13 +7,12 @@
namespace UnitsNet
{
- public sealed partial class BaseUnits : IEquatable { }
-
+ ///
///
/// Represents the base units for a quantity. All quantities, both base and derived, can be
/// represented by a combination of these seven base units.
///
- public sealed partial class BaseUnits
+ public sealed class BaseUnits: IEquatable
{
///
/// Creates an instance of if the base units class that represents the base units for a quantity.
diff --git a/UnitsNet/CustomCode/GlobalConfiguration.cs b/UnitsNet/CustomCode/GlobalConfiguration.cs
index b4f0f2c1df..e50c468c5f 100644
--- a/UnitsNet/CustomCode/GlobalConfiguration.cs
+++ b/UnitsNet/CustomCode/GlobalConfiguration.cs
@@ -7,7 +7,11 @@
// ReSharper disable once CheckNamespace
namespace UnitsNet
{
- public sealed class GlobalConfiguration
+ ///
+ /// Global configuration for culture, used as default culture in methods like and
+ /// .
+ ///
+ public static class GlobalConfiguration
{
///
/// Defaults to when creating an instance with no culture provided.
diff --git a/UnitsNet/CustomCode/Quantities/Angle.extra.cs b/UnitsNet/CustomCode/Quantities/Angle.extra.cs
index c77fe4027c..59318915c4 100644
--- a/UnitsNet/CustomCode/Quantities/Angle.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Angle.extra.cs
@@ -7,11 +7,13 @@ namespace UnitsNet
{
public partial struct Angle
{
+ /// Get from delta over time delta.
public static RotationalSpeed operator /(Angle angle, TimeSpan timeSpan)
{
return RotationalSpeed.FromRadiansPerSecond(angle.Radians / timeSpan.TotalSeconds);
}
+ ///
public static RotationalSpeed operator /(Angle angle, Duration duration)
{
return RotationalSpeed.FromRadiansPerSecond(angle.Radians / duration.Seconds);
diff --git a/UnitsNet/CustomCode/Quantities/Area.extra.cs b/UnitsNet/CustomCode/Quantities/Area.extra.cs
index 668a79808a..a4c005015c 100644
--- a/UnitsNet/CustomCode/Quantities/Area.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Area.extra.cs
@@ -9,12 +9,14 @@ public partial struct Area
{
#region Static Methods
+ /// Get circle area from a diameter.
public static Area FromCircleDiameter(Length diameter)
{
var radius = Length.FromMeters(diameter.Meters / 2d);
return FromCircleRadius(radius);
}
+ /// Get circle area from a radius.
public static Area FromCircleRadius(Length radius)
{
return FromSquareMeters(Math.PI * radius.Meters * radius.Meters);
@@ -22,16 +24,19 @@ public static Area FromCircleRadius(Length radius)
#endregion
+ /// Get from divided by .
public static Length operator /(Area area, Length length)
{
return Length.FromMeters(area.SquareMeters / length.Meters);
}
+ /// Get from times .
public static MassFlow operator *(Area area, MassFlux massFlux)
{
return MassFlow.FromGramsPerSecond(area.SquareMeters * massFlux.GramsPerSecondPerSquareMeter);
}
+ /// Get from times .
public static VolumeFlow operator *(Area area, Speed speed)
{
return VolumeFlow.FromCubicMetersPerSecond(area.SquareMeters * speed.MetersPerSecond);
diff --git a/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs b/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs
index cf53b5741d..5bd29a877a 100644
--- a/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs
@@ -5,16 +5,19 @@ namespace UnitsNet
{
public partial struct BrakeSpecificFuelConsumption
{
+ /// Get from times .
public static MassFlow operator *(BrakeSpecificFuelConsumption bsfc, Power power)
{
return MassFlow.FromKilogramsPerSecond(bsfc.KilogramsPerJoule*power.Watts);
}
+ /// Get from divided by .
public static SpecificEnergy operator /(double value, BrakeSpecificFuelConsumption bsfc)
{
return SpecificEnergy.FromJoulesPerKilogram(value/bsfc.KilogramsPerJoule);
}
+ /// Get constant from times .
public static double operator *(BrakeSpecificFuelConsumption bsfc, SpecificEnergy specificEnergy)
{
return specificEnergy.JoulesPerKilogram*bsfc.KilogramsPerJoule;
diff --git a/UnitsNet/CustomCode/Quantities/Density.extra.cs b/UnitsNet/CustomCode/Quantities/Density.extra.cs
index bd71f1de60..43dfabbd42 100644
--- a/UnitsNet/CustomCode/Quantities/Density.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Density.extra.cs
@@ -21,8 +21,6 @@ public Molarity ToMolarity(Mass molecularWeight)
///
/// Get from .
///
- ///
- ///
public static Density FromMolarity(Molarity molarity, Mass molecularWeight)
{
return new Density(molarity.MolesPerCubicMeter * molecularWeight.Kilograms, DensityUnit.KilogramPerCubicMeter);
@@ -30,29 +28,40 @@ public static Density FromMolarity(Molarity molarity, Mass molecularWeight)
#endregion
+ /// Get from times .
public static Mass operator *(Density density, Volume volume)
{
return Mass.FromKilograms(density.KilogramsPerCubicMeter * volume.CubicMeters);
}
+ /// Get from times .
public static Mass operator *(Volume volume, Density density)
{
return Mass.FromKilograms(density.KilogramsPerCubicMeter * volume.CubicMeters);
}
+ /// Get from times .
public static DynamicViscosity operator *(Density density, KinematicViscosity kinematicViscosity)
{
return DynamicViscosity.FromNewtonSecondsPerMeterSquared(kinematicViscosity.SquareMetersPerSecond * density.KilogramsPerCubicMeter);
}
+ /// Get times .
public static MassFlux operator *(Density density, Speed speed)
{
return MassFlux.FromKilogramsPerSecondPerSquareMeter(density.KilogramsPerCubicMeter * speed.MetersPerSecond);
}
+ /// Get from times .
public static SpecificWeight operator *(Density density, Acceleration acceleration)
{
return new SpecificWeight(density.KilogramsPerCubicMeter * acceleration.MetersPerSecondSquared, SpecificWeightUnit.NewtonPerCubicMeter);
}
+
+ /// Get from divided by .
+ public static Molarity operator /(Density density, Mass molecularWeight)
+ {
+ return new Molarity(density.KilogramsPerCubicMeter / molecularWeight.Kilograms, MolarityUnit.MolesPerCubicMeter);
+ }
}
}
diff --git a/UnitsNet/CustomCode/Quantities/Duration.extra.cs b/UnitsNet/CustomCode/Quantities/Duration.extra.cs
index 133cfff587..61501525a0 100644
--- a/UnitsNet/CustomCode/Quantities/Duration.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Duration.extra.cs
@@ -20,66 +20,79 @@ public TimeSpan ToTimeSpan()
return TimeSpan.FromSeconds( Seconds );
}
+ /// Get from plus .
public static DateTime operator +(DateTime time, Duration duration)
{
return time.AddSeconds(duration.Seconds);
}
+ /// Get from minus .
public static DateTime operator -(DateTime time, Duration duration)
{
return time.AddSeconds(-duration.Seconds);
}
+ /// Explicitly cast to .
public static explicit operator TimeSpan(Duration duration)
{
return duration.ToTimeSpan();
}
+ /// Explicitly cast to .
public static explicit operator Duration(TimeSpan duration)
{
return FromSeconds(duration.TotalSeconds);
}
+ /// True if is less than .
public static bool operator <(Duration duration, TimeSpan timeSpan)
{
return duration.Seconds < timeSpan.TotalSeconds;
}
+ /// True if is greater than .
public static bool operator >(Duration duration, TimeSpan timeSpan)
{
return duration.Seconds > timeSpan.TotalSeconds;
}
+ /// True if is less than or equal to .
public static bool operator <=(Duration duration, TimeSpan timeSpan)
{
return duration.Seconds <= timeSpan.TotalSeconds;
}
+ /// True if is greater than or equal to .
public static bool operator >=(Duration duration, TimeSpan timeSpan)
{
return duration.Seconds >= timeSpan.TotalSeconds;
}
+ /// True if is less than .
public static bool operator <(TimeSpan timeSpan, Duration duration)
{
return timeSpan.TotalSeconds < duration.Seconds;
}
+ /// True if is greater than .
public static bool operator >(TimeSpan timeSpan, Duration duration)
{
return timeSpan.TotalSeconds > duration.Seconds;
}
+ /// True if is less than or equal to .
public static bool operator <=(TimeSpan timeSpan, Duration duration)
{
return timeSpan.TotalSeconds <= duration.Seconds;
}
+ /// True if is greater than or equal to .
public static bool operator >=(TimeSpan timeSpan, Duration duration)
{
return timeSpan.TotalSeconds >= duration.Seconds;
}
+ /// Get from times .
public static Volume operator *(Duration duration, VolumeFlow volumeFlow)
{
return Volume.FromCubicMeters(volumeFlow.CubicMetersPerSecond * duration.Seconds);
diff --git a/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs b/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs
index 56b5fd5171..e99348a111 100644
--- a/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs
@@ -5,6 +5,7 @@ namespace UnitsNet
{
public partial struct DynamicViscosity
{
+ /// Get from divided by .
public static KinematicViscosity operator /(DynamicViscosity dynamicViscosity, Density density)
{
return KinematicViscosity.FromSquareMetersPerSecond(dynamicViscosity.NewtonSecondsPerMeterSquared / density.KilogramsPerCubicMeter);
diff --git a/UnitsNet/CustomCode/Quantities/Force.extra.cs b/UnitsNet/CustomCode/Quantities/Force.extra.cs
index f21552ba96..1d9881edff 100644
--- a/UnitsNet/CustomCode/Quantities/Force.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Force.extra.cs
@@ -7,42 +7,50 @@ namespace UnitsNet
{
public partial struct Force
{
+ /// Get from divided by .
public static Force FromPressureByArea(Pressure p, Area area)
{
double newtons = p.Pascals * area.SquareMeters;
return new Force(newtons, ForceUnit.Newton);
}
+ /// Get from times .
public static Force FromMassByAcceleration(Mass mass, Acceleration acceleration)
{
return new Force(mass.Kilograms * acceleration.MetersPerSecondSquared, ForceUnit.Newton);
}
+ /// Get from times .
public static Power operator *(Force force, Speed speed)
{
return Power.FromWatts(force.Newtons * speed.MetersPerSecond);
}
+ /// Get from times .
public static Power operator *(Speed speed, Force force)
{
return Power.FromWatts(force.Newtons * speed.MetersPerSecond);
}
+ /// Get from divided by .
public static Acceleration operator /(Force force, Mass mass)
{
return Acceleration.FromMetersPerSecondSquared(force.Newtons / mass.Kilograms);
}
- public static Mass operator /(Force force, Acceleration mass)
+ /// Get from divided by .
+ public static Mass operator /(Force force, Acceleration acceleration)
{
- return Mass.FromKilograms(force.Newtons / mass.MetersPerSecondSquared);
+ return Mass.FromKilograms(force.Newtons / acceleration.MetersPerSecondSquared);
}
+ /// Get from divided by .
public static Pressure operator /(Force force, Area area)
{
return Pressure.FromPascals(force.Newtons / area.SquareMeters);
}
+ /// Get from divided by .
public static ForcePerLength operator /(Force force, Length length)
{
return ForcePerLength.FromNewtonsPerMeter(force.Newtons / length.Meters);
diff --git a/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs b/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs
index 7bd0170a90..813190866f 100644
--- a/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs
@@ -5,16 +5,19 @@ namespace UnitsNet
{
public partial struct ForcePerLength
{
+ /// Get from divided by .
public static Force operator *(ForcePerLength forcePerLength, Length length)
{
return Force.FromNewtons(forcePerLength.NewtonsPerMeter * length.Meters);
}
+ /// Get from divided by .
public static Length operator /(Force force, ForcePerLength forcePerLength)
{
return Length.FromMeters(force.Newtons / forcePerLength.NewtonsPerMeter);
}
+ /// Get from divided by .
public static Pressure operator /(ForcePerLength forcePerLength, Length length)
{
return Pressure.FromNewtonsPerSquareMeter(forcePerLength.NewtonsPerMeter / length.Meters);
diff --git a/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs b/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs
index 6caa0d0c0d..395661fb1f 100644
--- a/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs
@@ -5,6 +5,7 @@ namespace UnitsNet
{
public partial struct HeatFlux
{
+ /// Get from times .
public static Power operator *(HeatFlux heatFlux, Area area)
{
return Power.FromWatts(heatFlux.WattsPerSquareMeter * area.SquareMeters);
diff --git a/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs b/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs
index 4c834e3c85..f43b75534c 100644
--- a/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs
@@ -7,31 +7,37 @@ namespace UnitsNet
{
public partial struct KinematicViscosity
{
+ /// Get from divided by .
public static Speed operator /(KinematicViscosity kinematicViscosity, Length length)
{
return Speed.FromMetersPerSecond(kinematicViscosity.SquareMetersPerSecond / length.Meters);
}
+ /// Get from times .
public static Area operator *(KinematicViscosity kinematicViscosity, TimeSpan timeSpan)
{
return Area.FromSquareMeters(kinematicViscosity.SquareMetersPerSecond * timeSpan.TotalSeconds);
}
+ /// Get from times .
public static Area operator *(TimeSpan timeSpan, KinematicViscosity kinematicViscosity)
{
return Area.FromSquareMeters(kinematicViscosity.SquareMetersPerSecond * timeSpan.TotalSeconds);
}
+ /// Get from times .
public static Area operator *(KinematicViscosity kinematicViscosity, Duration duration)
{
return Area.FromSquareMeters(kinematicViscosity.SquareMetersPerSecond * duration.Seconds);
}
+ /// Get from times .
public static Area operator *(Duration duration, KinematicViscosity kinematicViscosity)
{
return Area.FromSquareMeters(kinematicViscosity.SquareMetersPerSecond * duration.Seconds);
}
+ /// Get from times .
public static DynamicViscosity operator *(KinematicViscosity kinematicViscosity, Density density)
{
return DynamicViscosity.FromNewtonSecondsPerMeterSquared(kinematicViscosity.SquareMetersPerSecond * density.KilogramsPerCubicMeter);
diff --git a/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs b/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs
index 7b54b03637..6f675602e0 100644
--- a/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs
@@ -5,13 +5,16 @@ namespace UnitsNet
{
public partial struct LapseRate
{
+ /// Get from divided by .
public static Length operator /(TemperatureDelta left, LapseRate right)
{
return Length.FromKilometers(left.Kelvins / right.DegreesCelciusPerKilometer);
}
+ /// Get from times .
public static TemperatureDelta operator *(Length left, LapseRate right) => right * left;
+ /// Get from times .
public static TemperatureDelta operator *(LapseRate left, Length right)
{
return TemperatureDelta.FromDegreesCelsius(left.DegreesCelciusPerKilometer * right.Kilometers);
diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs
index 68e697df6b..44d463d6c6 100644
--- a/UnitsNet/CustomCode/Quantities/Length.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs
@@ -3,6 +3,7 @@
using System;
using System.Text.RegularExpressions;
+using System.Threading;
using JetBrains.Annotations;
using UnitsNet.Units;
@@ -104,73 +105,106 @@ public static bool TryParseFeetInches([CanBeNull] string str, out Length result,
return false;
}
+ /// Get from divided by .
public static Speed operator /(Length length, TimeSpan timeSpan)
{
return Speed.FromMetersPerSecond(length.Meters/timeSpan.TotalSeconds);
}
+ /// Get from divided by .
public static Speed operator /(Length length, Duration duration)
{
return Speed.FromMetersPerSecond(length.Meters/duration.Seconds);
}
+ /// Get from divided by .
public static Duration operator /(Length length, Speed speed)
{
return Duration.FromSeconds(length.Meters/speed.MetersPerSecond);
}
+ /// Get from times .
public static Area operator *(Length length1, Length length2)
{
return Area.FromSquareMeters(length1.Meters*length2.Meters);
}
+ /// Get from times .
public static Volume operator *(Area area, Length length)
{
return Volume.FromCubicMeters(area.SquareMeters*length.Meters);
}
+ /// Get from times .
public static Volume operator *(Length length, Area area)
{
return Volume.FromCubicMeters(area.SquareMeters*length.Meters);
}
+ /// Get from times .
public static Torque operator *(Force force, Length length)
{
return Torque.FromNewtonMeters(force.Newtons*length.Meters);
}
+ /// Get from times .
public static Torque operator *(Length length, Force force)
{
return Torque.FromNewtonMeters(force.Newtons*length.Meters);
}
+ /// Get from times .
public static KinematicViscosity operator *(Length length, Speed speed)
{
return KinematicViscosity.FromSquareMetersPerSecond(length.Meters*speed.MetersPerSecond);
}
+ /// Get from times .
public static Pressure operator *(Length length, SpecificWeight specificWeight)
{
return new Pressure(length.Meters * specificWeight.NewtonsPerCubicMeter, PressureUnit.Pascal);
}
}
+ ///
+ /// Representation of feet and inches, used to preserve the original values when constructing by
+ /// and later output them unaltered with .
+ ///
public sealed class FeetInches
{
+ ///
+ /// Construct from feet and inches.
+ ///
public FeetInches(double feet, double inches)
{
Feet = feet;
Inches = inches;
}
+ ///
+ /// The feet value it was constructed with.
+ ///
public double Feet { get; }
+
+ ///
+ /// The inches value it was constructed with.
+ ///
public double Inches { get; }
+ ///
public override string ToString()
{
return ToString(null);
}
+ ///
+ /// Outputs feet and inches on the format: {feetValue} {feetUnit} {inchesValue} {inchesUnit}
+ ///
+ /// Length.FromFeetInches(3,2).FeetInches.ToString() outputs: "3 ft 2 in"
+ ///
+ /// Optional culture to format number and localize unit abbreviations.
+ /// If null, defaults to .
+ ///
public string ToString([CanBeNull] IFormatProvider cultureInfo)
{
cultureInfo = cultureInfo ?? GlobalConfiguration.DefaultCulture;
diff --git a/UnitsNet/CustomCode/Quantities/Mass.extra.cs b/UnitsNet/CustomCode/Quantities/Mass.extra.cs
index 610a646a80..9b2b77bc42 100644
--- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs
@@ -2,6 +2,7 @@
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
using System;
+using System.Threading;
using JetBrains.Annotations;
using UnitsNet.Units;
@@ -9,6 +10,7 @@ namespace UnitsNet
{
public partial struct Mass
{
+ /// Get from of gravity.
public static Mass FromGravitationalForce(Force f)
{
return new Mass(f.KilogramsForce, MassUnit.Kilogram);
@@ -44,53 +46,82 @@ public static Mass FromStonePounds(double stone, double pounds)
return FromPounds(StonesInOnePound*stone + pounds);
}
+ /// Get from divided by .
public static MassFlow operator /(Mass mass, TimeSpan timeSpan)
{
return MassFlow.FromKilogramsPerSecond(mass.Kilograms/timeSpan.TotalSeconds);
}
+ /// Get from divided by .
public static MassFlow operator /(Mass mass, Duration duration)
{
return MassFlow.FromKilogramsPerSecond(mass.Kilograms/duration.Seconds);
}
+ /// Get from divided by .
public static Density operator /(Mass mass, Volume volume)
{
return Density.FromKilogramsPerCubicMeter(mass.Kilograms/volume.CubicMeters);
}
+ /// Get from divided by .
public static Volume operator /(Mass mass, Density density)
{
return Volume.FromCubicMeters(mass.Kilograms / density.KilogramsPerCubicMeter);
}
+ /// Get from times .
public static Force operator *(Mass mass, Acceleration acceleration)
{
return Force.FromNewtons(mass.Kilograms*acceleration.MetersPerSecondSquared);
}
+ /// Get from times .
public static Force operator *(Acceleration acceleration, Mass mass)
{
return Force.FromNewtons(mass.Kilograms*acceleration.MetersPerSecondSquared);
}
}
+ ///
+ /// Representation of stone and pounds, used to preserve the original values when constructing by
+ /// and later output them unaltered with .
+ ///
public sealed class StonePounds
{
+ ///
+ /// Construct from stone and pounds.
+ ///
public StonePounds(double stone, double pounds)
{
Stone = stone;
Pounds = pounds;
}
+ ///
+ /// The stone value it was created with.
+ ///
public double Stone { get; }
+
+ ///
+ /// The pounds value it was created with.
+ ///
public double Pounds { get; }
+ ///
public override string ToString()
{
return ToString(null);
}
+ ///
+ /// Outputs stone and pounds on the format: {stoneValue} {stoneUnit} {poundsValue} {poundsUnit}
+ ///
+ /// Mass.FromStonePounds(3,2).StonePounds.ToString() outputs: "3 st 2 lb"
+ ///
+ /// Optional culture to format number and localize unit abbreviations.
+ /// If null, defaults to .
+ ///
public string ToString([CanBeNull] IFormatProvider cultureInfo)
{
cultureInfo = cultureInfo ?? GlobalConfiguration.DefaultCulture;
diff --git a/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs b/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs
index 960834279d..e60c5c75d8 100644
--- a/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs
@@ -7,56 +7,67 @@ namespace UnitsNet
{
public partial struct MassFlow
{
+ /// Get from times .
public static Mass operator *(MassFlow massFlow, TimeSpan time)
{
return Mass.FromKilograms(massFlow.KilogramsPerSecond * time.TotalSeconds);
}
+ /// Get from times .
public static Mass operator *(TimeSpan time, MassFlow massFlow)
{
return Mass.FromKilograms(massFlow.KilogramsPerSecond * time.TotalSeconds);
}
+ /// Get from times .
public static Mass operator *(MassFlow massFlow, Duration duration)
{
return Mass.FromKilograms(massFlow.KilogramsPerSecond * duration.Seconds);
}
+ /// Get from times .
public static Mass operator *(Duration duration, MassFlow massFlow)
{
return Mass.FromKilograms(massFlow.KilogramsPerSecond * duration.Seconds);
}
+ /// Get from divided by .
public static Power operator /(MassFlow massFlow, BrakeSpecificFuelConsumption bsfc)
{
return Power.FromWatts(massFlow.KilogramsPerSecond / bsfc.KilogramsPerJoule);
}
+ /// Get from divided by .
public static BrakeSpecificFuelConsumption operator /(MassFlow massFlow, Power power)
{
return BrakeSpecificFuelConsumption.FromKilogramsPerJoule(massFlow.KilogramsPerSecond / power.Watts);
}
+ /// Get from times .
public static Power operator *(MassFlow massFlow, SpecificEnergy specificEnergy)
{
return Power.FromWatts(massFlow.KilogramsPerSecond * specificEnergy.JoulesPerKilogram);
}
+ /// Get from divided by .
public static MassFlux operator /(MassFlow massFlow, Area area)
{
return MassFlux.FromKilogramsPerSecondPerSquareMeter(massFlow.KilogramsPerSecond / area.SquareMeters);
}
+ /// Get from divided by .
public static Area operator /(MassFlow massFlow, MassFlux massFlux)
{
return Area.FromSquareMeters(massFlow.KilogramsPerSecond / massFlux.KilogramsPerSecondPerSquareMeter);
}
+ /// Get from divided by .
public static Density operator /(MassFlow massFlow, VolumeFlow volumeFlow)
{
return Density.FromKilogramsPerCubicMeter(massFlow.KilogramsPerSecond / volumeFlow.CubicMetersPerSecond);
}
+ /// Get from divided by .
public static VolumeFlow operator /(MassFlow massFlow, Density density)
{
return VolumeFlow.FromCubicMetersPerSecond(massFlow.KilogramsPerSecond / density.KilogramsPerCubicMeter);
diff --git a/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs b/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs
index ed0b0ea461..654ce48a20 100644
--- a/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs
@@ -5,14 +5,19 @@ namespace UnitsNet
{
public partial struct MassFlux
{
+ /// Get from divided by .
public static Density operator /(MassFlux massFlux, Speed speed)
{
return Density.FromKilogramsPerCubicMeter(massFlux.KilogramsPerSecondPerSquareMeter / speed.MetersPerSecond);
}
+
+ /// Get from divided by .
public static Speed operator /(MassFlux massFlux, Density density)
{
return Speed.FromMetersPerSecond(massFlux.KilogramsPerSecondPerSquareMeter / density.KilogramsPerCubicMeter);
}
+
+ /// Get from times .
public static MassFlow operator *(MassFlux massFlux, Area area)
{
return MassFlow.FromGramsPerSecond(massFlux.GramsPerSecondPerSquareMeter * area.SquareMeters);
diff --git a/UnitsNet/CustomCode/Quantities/Molarity.extra.cs b/UnitsNet/CustomCode/Quantities/Molarity.extra.cs
index f56ea5304a..b7ce39d5f3 100644
--- a/UnitsNet/CustomCode/Quantities/Molarity.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Molarity.extra.cs
@@ -1,9 +1,15 @@
-using UnitsNet.Units;
+using System;
+using UnitsNet.Units;
namespace UnitsNet
{
public partial struct Molarity
{
+ ///
+ /// Construct from divided by .
+ ///
+ ///
+ [Obsolete("This constructor will be removed in favor of operator overload Density.op_Division(UnitsNet.Density,UnitsNet.Mass).")]
public Molarity(Density density, Mass molecularWeight)
: this()
{
@@ -27,9 +33,10 @@ public Density ToDensity(Mass molecularWeight)
///
///
///
+ [Obsolete("Use Density / Mass operator overload instead.")]
public static Molarity FromDensity(Density density, Mass molecularWeight)
{
- return new Molarity(density, molecularWeight);
+ return density / molecularWeight;
}
#endregion
diff --git a/UnitsNet/CustomCode/Quantities/Power.extra.cs b/UnitsNet/CustomCode/Quantities/Power.extra.cs
index 21e6f54578..4b61a19b76 100644
--- a/UnitsNet/CustomCode/Quantities/Power.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Power.extra.cs
@@ -21,61 +21,73 @@ public PowerRatio ToPowerRatio()
return PowerRatio.FromPower(this);
}
+ /// Get from times .
public static Energy operator *(Power power, TimeSpan time)
{
return Energy.FromJoules(power.Watts * time.TotalSeconds);
}
+ /// Get from times .
public static Energy operator *(TimeSpan time, Power power)
{
return Energy.FromJoules(power.Watts * time.TotalSeconds);
}
+ /// Get from times .
public static Energy operator *(Power power, Duration duration)
{
return Energy.FromJoules(power.Watts * duration.Seconds);
}
+ /// Get from times .
public static Energy operator *(Duration duration, Power power)
{
return Energy.FromJoules(power.Watts * duration.Seconds);
}
+ /// Get from divided by .
public static Force operator /(Power power, Speed speed)
{
return Force.FromNewtons(power.Watts / speed.MetersPerSecond);
}
+ /// Get from divided by .
public static Torque operator /(Power power, RotationalSpeed rotationalSpeed)
{
return Torque.FromNewtonMeters(power.Watts / rotationalSpeed.RadiansPerSecond);
}
+ /// Get from divided by .
public static RotationalSpeed operator /(Power power, Torque torque)
{
return RotationalSpeed.FromRadiansPerSecond(power.Watts / torque.NewtonMeters);
}
+ /// Get from times .
public static MassFlow operator *(Power power, BrakeSpecificFuelConsumption bsfc)
{
return MassFlow.FromKilogramsPerSecond(bsfc.KilogramsPerJoule * power.Watts);
}
+ /// Get from divided by .
public static SpecificEnergy operator /(Power power, MassFlow massFlow)
{
return SpecificEnergy.FromJoulesPerKilogram(power.Watts / massFlow.KilogramsPerSecond);
}
+ /// Get from divided by .
public static MassFlow operator /(Power power, SpecificEnergy specificEnergy)
{
return MassFlow.FromKilogramsPerSecond(power.Watts / specificEnergy.JoulesPerKilogram);
}
+ /// Get from divided by .
public static HeatFlux operator /(Power power, Area area)
{
return HeatFlux.FromWattsPerSquareMeter(power.Watts / area.SquareMeters);
}
+ /// Get from divided by .
public static Area operator /(Power power, HeatFlux heatFlux)
{
return Area.FromSquareMeters( power.Watts / heatFlux.WattsPerSquareMeter );
diff --git a/UnitsNet/CustomCode/Quantities/Pressure.extra.cs b/UnitsNet/CustomCode/Quantities/Pressure.extra.cs
index a3c1b1daeb..ecaf977ed6 100644
--- a/UnitsNet/CustomCode/Quantities/Pressure.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Pressure.extra.cs
@@ -5,21 +5,25 @@ namespace UnitsNet
{
public partial struct Pressure
{
+ /// Get from times .
public static Force operator *(Pressure pressure, Area area)
{
return Force.FromNewtons(pressure.Pascals * area.SquareMeters);
}
+ /// Get from times .
public static Force operator *(Area area, Pressure pressure)
{
return Force.FromNewtons(pressure.Pascals * area.SquareMeters);
}
+ /// Get from divided by .
public static Length operator /(Pressure pressure, SpecificWeight specificWeight)
{
return new Length(pressure.Pascals / specificWeight.NewtonsPerCubicMeter, UnitsNet.Units.LengthUnit.Meter);
}
+ /// Get from divided by .
public static SpecificWeight operator /(Pressure pressure, Length length)
{
return new SpecificWeight(pressure.Pascals / length.Meters, UnitsNet.Units.SpecificWeightUnit.NewtonPerCubicMeter);
diff --git a/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs b/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs
index 26c6c259aa..a1f18c79cd 100644
--- a/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs
@@ -7,21 +7,25 @@ namespace UnitsNet
{
public partial struct RotationalSpeed
{
+ /// Get from times .
public static Angle operator *(RotationalSpeed rotationalSpeed, TimeSpan timeSpan)
{
return Angle.FromRadians(rotationalSpeed.RadiansPerSecond * timeSpan.TotalSeconds);
}
+ /// Get from times .
public static Angle operator *(TimeSpan timeSpan, RotationalSpeed rotationalSpeed)
{
return Angle.FromRadians(rotationalSpeed.RadiansPerSecond * timeSpan.TotalSeconds);
}
+ /// Get from times .
public static Angle operator *(RotationalSpeed rotationalSpeed, Duration duration)
{
return Angle.FromRadians(rotationalSpeed.RadiansPerSecond * duration.Seconds);
}
+ /// Get from times .
public static Angle operator *(Duration duration, RotationalSpeed rotationalSpeed)
{
return Angle.FromRadians(rotationalSpeed.RadiansPerSecond * duration.Seconds);
diff --git a/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs b/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs
index 310bb2b530..48b9342455 100644
--- a/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs
@@ -5,16 +5,19 @@ namespace UnitsNet
{
public partial struct RotationalStiffness
{
+ /// Get from times .
public static Torque operator *(RotationalStiffness rotationalStiffness, Angle angle)
{
return Torque.FromNewtonMeters(rotationalStiffness.NewtonMetersPerRadian * angle.Radians);
}
+ /// Get from divided by .
public static RotationalStiffnessPerLength operator /(RotationalStiffness rotationalStiffness, Length length)
{
return RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(rotationalStiffness.NewtonMetersPerRadian / length.Meters);
}
+ /// Get from divided by .
public static Length operator /(RotationalStiffness rotationalStiffness, RotationalStiffnessPerLength rotationalStiffnessPerLength)
{
return Length.FromMeters(rotationalStiffness.NewtonMetersPerRadian / rotationalStiffnessPerLength.NewtonMetersPerRadianPerMeter);
diff --git a/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs b/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs
index 8738b4c895..1aef772c05 100644
--- a/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs
@@ -6,6 +6,7 @@ namespace UnitsNet
{
public partial struct RotationalStiffnessPerLength
{
+ /// Get from times .
public static RotationalStiffness operator *(RotationalStiffnessPerLength rotationalStiffness, Length length)
{
return RotationalStiffness.FromNewtonMetersPerRadian(rotationalStiffness.NewtonMetersPerRadianPerMeter * length.Meters);
diff --git a/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs b/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs
index 8de2d837ba..45f4473f80 100644
--- a/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs
@@ -5,26 +5,31 @@ namespace UnitsNet
{
public partial struct SpecificEnergy
{
+ /// Get from times .
public static Energy operator *(SpecificEnergy specificEnergy, Mass mass)
{
return Energy.FromJoules(specificEnergy.JoulesPerKilogram * mass.Kilograms);
}
+ /// Get from times .
public static Energy operator *(Mass mass, SpecificEnergy specificEnergy)
{
return Energy.FromJoules(specificEnergy.JoulesPerKilogram * mass.Kilograms);
}
+ /// Get from divided by .
public static BrakeSpecificFuelConsumption operator /(double value, SpecificEnergy specificEnergy)
{
return BrakeSpecificFuelConsumption.FromKilogramsPerJoule(value / specificEnergy.JoulesPerKilogram);
}
+ /// Get from times .
public static double operator *(SpecificEnergy specificEnergy, BrakeSpecificFuelConsumption bsfc)
{
return specificEnergy.JoulesPerKilogram * bsfc.KilogramsPerJoule;
}
+ /// Get from times .
public static Power operator *(SpecificEnergy specificEnergy, MassFlow massFlow)
{
return Power.FromWatts(massFlow.KilogramsPerSecond * specificEnergy.JoulesPerKilogram);
diff --git a/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs b/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs
index b5339a0c03..f284f8bb28 100644
--- a/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs
@@ -5,11 +5,13 @@ namespace UnitsNet
{
public partial struct SpecificVolume
{
+ /// Get from divided by .
public static Density operator /(double constant, SpecificVolume volume)
{
return Density.FromKilogramsPerCubicMeter(constant / volume.CubicMetersPerKilogram);
}
+ /// Get from times .
public static Volume operator *(SpecificVolume volume, Mass mass)
{
return Volume.FromCubicMeters(volume.CubicMetersPerKilogram * mass.Kilograms);
diff --git a/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs b/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs
index bb847f8b8a..fca03f5270 100644
--- a/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs
@@ -5,16 +5,19 @@ namespace UnitsNet
{
public partial struct SpecificWeight
{
+ /// Get from times .
public static Pressure operator *(SpecificWeight specificWeight, Length length)
{
return new Pressure(specificWeight.NewtonsPerCubicMeter * length.Meters, UnitsNet.Units.PressureUnit.Pascal);
}
+ /// Get from divided by .
public static Acceleration operator /(SpecificWeight specificWeight, Density density)
{
return new Acceleration(specificWeight.NewtonsPerCubicMeter / density.KilogramsPerCubicMeter, UnitsNet.Units.AccelerationUnit.MeterPerSecondSquared);
}
+ /// Get from divided by .
public static Density operator /(SpecificWeight specific, Acceleration acceleration)
{
return new Density(specific.NewtonsPerCubicMeter / acceleration.MetersPerSecondSquared, UnitsNet.Units.DensityUnit.KilogramPerCubicMeter);
diff --git a/UnitsNet/CustomCode/Quantities/Speed.extra.cs b/UnitsNet/CustomCode/Quantities/Speed.extra.cs
index 37a99fe6f8..549fff0bea 100644
--- a/UnitsNet/CustomCode/Quantities/Speed.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Speed.extra.cs
@@ -7,51 +7,61 @@ namespace UnitsNet
{
public partial struct Speed
{
+ /// Get from divided by .
public static Acceleration operator /(Speed speed, TimeSpan timeSpan)
{
return Acceleration.FromMetersPerSecondSquared(speed.MetersPerSecond / timeSpan.TotalSeconds);
}
+ /// Get from times .
public static Length operator *(Speed speed, TimeSpan timeSpan)
{
return Length.FromMeters(speed.MetersPerSecond * timeSpan.TotalSeconds);
}
+ /// Get from times .
public static Length operator *(TimeSpan timeSpan, Speed speed)
{
return Length.FromMeters(speed.MetersPerSecond * timeSpan.TotalSeconds);
}
+ /// Get from divided by .
public static Acceleration operator /(Speed speed, Duration duration)
{
return Acceleration.FromMetersPerSecondSquared(speed.MetersPerSecond / duration.Seconds);
}
+ /// Get from times .
public static Length operator *(Speed speed, Duration duration)
{
return Length.FromMeters(speed.MetersPerSecond * duration.Seconds);
}
+ /// Get from times .
public static Length operator *(Duration duration, Speed speed)
{
return Length.FromMeters(speed.MetersPerSecond * duration.Seconds);
}
+ /// Get from times .
public static KinematicViscosity operator *(Speed speed, Length length)
{
return KinematicViscosity.FromSquareMetersPerSecond(length.Meters * speed.MetersPerSecond);
}
+ /// Get from times .
public static SpecificEnergy operator *(Speed left, Speed right)
{
return SpecificEnergy.FromJoulesPerKilogram(left.MetersPerSecond * right.MetersPerSecond);
}
+ /// Get from times .
public static MassFlux operator *(Speed speed, Density density)
{
return MassFlux.FromKilogramsPerSecondPerSquareMeter(speed.MetersPerSecond * density.KilogramsPerCubicMeter);
}
+ /// Get from times .
public static VolumeFlow operator *(Speed speed, Area area)
{
return VolumeFlow.FromCubicMetersPerSecond(speed.MetersPerSecond * area.SquareMeters);
diff --git a/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs b/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs
index a30e575bec..b3b3878cbb 100644
--- a/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs
@@ -5,16 +5,19 @@ namespace UnitsNet
{
public partial struct TemperatureDelta
{
+ /// Get from divided by .
public static LapseRate operator /(TemperatureDelta left, Length right)
{
return LapseRate.FromDegreesCelciusPerKilometer(left.DegreesCelsius / right.Kilometers);
}
+ /// Get from times .
public static SpecificEnergy operator *(SpecificEntropy specificEntropy, TemperatureDelta temperatureDelta)
{
return SpecificEnergy.FromJoulesPerKilogram(specificEntropy.JoulesPerKilogramKelvin * temperatureDelta.Kelvins);
}
+ /// Get from times .
public static SpecificEnergy operator *(TemperatureDelta temperatureDelta, SpecificEntropy specificEntropy)
{
return specificEntropy * temperatureDelta;
diff --git a/UnitsNet/CustomCode/Quantities/Torque.extra.cs b/UnitsNet/CustomCode/Quantities/Torque.extra.cs
index 6b70288210..26bd4f551b 100644
--- a/UnitsNet/CustomCode/Quantities/Torque.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Torque.extra.cs
@@ -5,21 +5,25 @@ namespace UnitsNet
{
public partial struct Torque
{
+ /// Get from times .
public static Force operator /(Torque torque, Length length)
{
return Force.FromNewtons(torque.NewtonMeters / length.Meters);
}
+ /// Get from times .
public static Length operator /(Torque torque, Force force)
{
return Length.FromMeters(torque.NewtonMeters / force.Newtons);
}
+ /// Get from times .
public static RotationalStiffness operator /(Torque torque, Angle angle)
{
return RotationalStiffness.FromNewtonMetersPerRadian(torque.NewtonMeters / angle.Radians);
}
+ /// Get from times .
public static Angle operator /(Torque torque, RotationalStiffness rotationalStiffness)
{
return Angle.FromRadians(torque.NewtonMeters / rotationalStiffness.NewtonMetersPerRadian);
diff --git a/UnitsNet/CustomCode/Quantities/Volume.extra.cs b/UnitsNet/CustomCode/Quantities/Volume.extra.cs
index b2d2b02815..aab43915a4 100644
--- a/UnitsNet/CustomCode/Quantities/Volume.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/Volume.extra.cs
@@ -7,26 +7,31 @@ namespace UnitsNet
{
public partial struct Volume
{
+ /// Get from divided by .
public static Area operator /(Volume volume, Length length)
{
return Area.FromSquareMeters(volume.CubicMeters / length.Meters);
}
+ /// Get from divided by .
public static Length operator /(Volume volume, Area area)
{
return Length.FromMeters(volume.CubicMeters / area.SquareMeters);
}
+ /// Get from divided by .
public static VolumeFlow operator /(Volume volume, Duration duration)
{
return VolumeFlow.FromCubicMetersPerSecond(volume.CubicMeters / duration.Seconds);
}
+ /// Get from divided by .
public static VolumeFlow operator /(Volume volume, TimeSpan timeSpan)
{
return VolumeFlow.FromCubicMetersPerSecond(volume.CubicMeters / timeSpan.TotalSeconds);
}
+ /// Get from divided by .
public static TimeSpan operator /(Volume volume, VolumeFlow volumeFlow)
{
return TimeSpan.FromSeconds(volume.CubicMeters / volumeFlow.CubicMetersPerSecond);
diff --git a/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs b/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs
index 0154dd55f9..51e71e8180 100644
--- a/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs
+++ b/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs
@@ -7,31 +7,37 @@ namespace UnitsNet
{
public partial struct VolumeFlow
{
+ /// Get from times .
public static Volume operator *(VolumeFlow volumeFlow, TimeSpan timeSpan)
{
return Volume.FromCubicMeters(volumeFlow.CubicMetersPerSecond * timeSpan.TotalSeconds);
}
+ /// Get from times .
public static Volume operator *(VolumeFlow volumeFlow, Duration duration)
{
return Volume.FromCubicMeters(volumeFlow.CubicMetersPerSecond * duration.Seconds);
}
+ /// Get from divided by .
public static Speed operator /(VolumeFlow volumeFlow, Area area)
{
return Speed.FromMetersPerSecond(volumeFlow.CubicMetersPerSecond / area.SquareMeters);
}
+ /// Get from divided by .
public static Area operator /(VolumeFlow volumeFlow, Speed speed)
{
return Area.FromSquareMeters(volumeFlow.CubicMetersPerSecond / speed.MetersPerSecond);
}
+ /// Get from times .
public static MassFlow operator *(VolumeFlow volumeFlow, Density density)
{
return MassFlow.FromKilogramsPerSecond(volumeFlow.CubicMetersPerSecond * density.KilogramsPerCubicMeter);
}
+ /// Get from times .
public static MassFlow operator *(Density density, VolumeFlow volumeFlow)
{
return MassFlow.FromKilogramsPerSecond(volumeFlow.CubicMetersPerSecond * density.KilogramsPerCubicMeter);
diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs
index cbe6d876c7..fb2fd7423f 100644
--- a/UnitsNet/CustomCode/Quantity.cs
+++ b/UnitsNet/CustomCode/Quantity.cs
@@ -60,6 +60,10 @@ public static IQuantity From(QuantityValue value, Enum unit)
$"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?");
}
+ ///
+ /// Get a list of quantities that has the given base dimensions.
+ ///
+ /// The base dimensions to match.
public static IEnumerable GetQuantitiesWithBaseDimensions(BaseDimensions baseDimensions)
{
return InfosLazy.Value.Where(info => info.BaseDimensions.Equals(baseDimensions));
diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
index 81d07b118c..cfded52e1d 100644
--- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
+++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs
@@ -14,6 +14,10 @@
// ReSharper disable once CheckNamespace
namespace UnitsNet
{
+ ///
+ /// Cache of the mapping between unit enum values and unit abbreviation strings for one or more cultures.
+ /// A static instance is used internally for ToString() and Parse() of quantities and units.
+ ///
public sealed partial class UnitAbbreviationsCache
{
private readonly Dictionary _lookupsForCulture;
@@ -29,8 +33,14 @@ public sealed partial class UnitAbbreviationsCache
///
private static readonly CultureInfo FallbackCulture = new CultureInfo("en-US");
+ ///
+ /// The static instance used internally for ToString() and Parse() of quantities and units.
+ ///
public static UnitAbbreviationsCache Default { get; }
+ ///
+ /// Create an instance of the cache and load all the abbreviations defined in the library.
+ ///
public UnitAbbreviationsCache()
{
_lookupsForCulture = new Dictionary();
diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs
index 0ae9dc0cbe..c40438900e 100644
--- a/UnitsNet/CustomCode/UnitParser.cs
+++ b/UnitsNet/CustomCode/UnitParser.cs
@@ -9,12 +9,25 @@
// ReSharper disable once CheckNamespace
namespace UnitsNet
{
+ ///
+ /// Parses units given a unit abbreviations cache.
+ /// The static instance is used internally to parse quantities and units using the
+ /// default abbreviations cache for all units and abbreviations defined in the library.
+ ///
public sealed class UnitParser
{
private readonly UnitAbbreviationsCache _unitAbbreviationsCache;
+ ///
+ /// The default static instance used internally to parse quantities and units using the
+ /// default abbreviations cache for all units and abbreviations defined in the library.
+ ///
public static UnitParser Default { get; }
+ ///
+ /// Create a parser using the given unit abbreviations cache.
+ ///
+ ///
public UnitParser(UnitAbbreviationsCache unitAbbreviationsCache)
{
_unitAbbreviationsCache = unitAbbreviationsCache ?? UnitAbbreviationsCache.Default;
diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs
index 358f5700a0..12f2029d89 100644
--- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Acceleration, in physics, is the rate at which the velocity of an object changes over time. An object's acceleration is the net result of any and all forces acting on the object, as described by Newton's Second Law. The SI unit for acceleration is the Meter per second squared (m/s²). Accelerations are vector quantities (they have magnitude and direction) and add according to the parallelogram law. As a vector, the calculated net force is equal to the product of the object's mass (a scalar quantity) and the acceleration.
///
@@ -113,14 +114,12 @@ public Acceleration(double numericValue, AccelerationUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public AccelerationUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -486,6 +485,7 @@ public static AccelerationUnit ParseUnit(string str, IFormatProvider provider =
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out AccelerationUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -510,36 +510,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Accele
#region Arithmetic Operators
+ /// Negate the value.
public static Acceleration operator -(Acceleration right)
{
return new Acceleration(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Acceleration operator +(Acceleration left, Acceleration right)
{
return new Acceleration(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Acceleration operator -(Acceleration left, Acceleration right)
{
return new Acceleration(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Acceleration operator *(double left, Acceleration right)
{
return new Acceleration(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Acceleration operator *(Acceleration left, double right)
{
return new Acceleration(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Acceleration operator /(Acceleration left, double right)
{
return new Acceleration(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Acceleration left, Acceleration right)
{
return left.MetersPerSecondSquared / right.MetersPerSecondSquared;
@@ -549,36 +556,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Accele
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Acceleration left, Acceleration right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Acceleration left, Acceleration right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Acceleration left, Acceleration right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Acceleration left, Acceleration right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Acceleration left, Acceleration right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Acceleration left, Acceleration right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -587,11 +603,14 @@ public int CompareTo(object obj)
return CompareTo(objAcceleration);
}
+ ///
public int CompareTo(Acceleration other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Acceleration objAcceleration))
@@ -600,6 +619,8 @@ public override bool Equals(object obj)
return Equals(objAcceleration);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Acceleration other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -684,6 +705,7 @@ public double As(AccelerationUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((AccelerationUnit) unit);
///
@@ -698,6 +720,7 @@ public Acceleration ToUnit(AccelerationUnit unit)
IQuantity IQuantity.ToUnit(AccelerationUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((AccelerationUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs
index 45770bb724..2bbc07e0c1 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Mole is the amount of substance containing Avagadro's Number (6.02 x 10 ^ 23) of real particles such as molecules,atoms, ions or radicals.
///
@@ -113,14 +114,12 @@ public AmountOfSubstance(double numericValue, AmountOfSubstanceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public AmountOfSubstanceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -514,6 +513,7 @@ public static AmountOfSubstanceUnit ParseUnit(string str, IFormatProvider provid
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out AmountOfSubstanceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -538,36 +538,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amount
#region Arithmetic Operators
+ /// Negate the value.
public static AmountOfSubstance operator -(AmountOfSubstance right)
{
return new AmountOfSubstance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static AmountOfSubstance operator +(AmountOfSubstance left, AmountOfSubstance right)
{
return new AmountOfSubstance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static AmountOfSubstance operator -(AmountOfSubstance left, AmountOfSubstance right)
{
return new AmountOfSubstance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static AmountOfSubstance operator *(double left, AmountOfSubstance right)
{
return new AmountOfSubstance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static AmountOfSubstance operator *(AmountOfSubstance left, double right)
{
return new AmountOfSubstance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static AmountOfSubstance operator /(AmountOfSubstance left, double right)
{
return new AmountOfSubstance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(AmountOfSubstance left, AmountOfSubstance right)
{
return left.Moles / right.Moles;
@@ -577,36 +584,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amount
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(AmountOfSubstance left, AmountOfSubstance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(AmountOfSubstance left, AmountOfSubstance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(AmountOfSubstance left, AmountOfSubstance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(AmountOfSubstance left, AmountOfSubstance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(AmountOfSubstance left, AmountOfSubstance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(AmountOfSubstance left, AmountOfSubstance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -615,11 +631,14 @@ public int CompareTo(object obj)
return CompareTo(objAmountOfSubstance);
}
+ ///
public int CompareTo(AmountOfSubstance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is AmountOfSubstance objAmountOfSubstance))
@@ -628,6 +647,8 @@ public override bool Equals(object obj)
return Equals(objAmountOfSubstance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(AmountOfSubstance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -712,6 +733,7 @@ public double As(AmountOfSubstanceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((AmountOfSubstanceUnit) unit);
///
@@ -726,6 +748,7 @@ public AmountOfSubstance ToUnit(AmountOfSubstanceUnit unit)
IQuantity IQuantity.ToUnit(AmountOfSubstanceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((AmountOfSubstanceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs
index 3ef4d59330..032c797038 100644
--- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The strength of a signal expressed in decibels (dB) relative to one volt RMS.
///
@@ -113,14 +114,12 @@ public AmplitudeRatio(double numericValue, AmplitudeRatioUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public AmplitudeRatioUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -360,6 +359,7 @@ public static AmplitudeRatioUnit ParseUnit(string str, IFormatProvider provider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out AmplitudeRatioUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -384,11 +384,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit
#region Logarithmic Arithmetic Operators
+ /// Negate the value.
public static AmplitudeRatio operator -(AmplitudeRatio right)
{
return new AmplitudeRatio(-right.Value, right.Unit);
}
+ /// Get from logarithmic addition of two .
public static AmplitudeRatio operator +(AmplitudeRatio left, AmplitudeRatio right)
{
// Logarithmic addition
@@ -396,6 +398,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit
return new AmplitudeRatio(20*Math.Log10(Math.Pow(10, left.Value/20) + Math.Pow(10, right.AsBaseNumericType(left.Unit)/20)), left.Unit);
}
+ /// Get from logarithmic subtraction of two .
public static AmplitudeRatio operator -(AmplitudeRatio left, AmplitudeRatio right)
{
// Logarithmic subtraction
@@ -403,24 +406,28 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit
return new AmplitudeRatio(20*Math.Log10(Math.Pow(10, left.Value/20) - Math.Pow(10, right.AsBaseNumericType(left.Unit)/20)), left.Unit);
}
+ /// Get from logarithmic multiplication of value and .
public static AmplitudeRatio operator *(double left, AmplitudeRatio right)
{
// Logarithmic multiplication = addition
return new AmplitudeRatio(left + right.Value, right.Unit);
}
+ /// Get from logarithmic multiplication of value and .
public static AmplitudeRatio operator *(AmplitudeRatio left, double right)
{
// Logarithmic multiplication = addition
return new AmplitudeRatio(left.Value + (double)right, left.Unit);
}
+ /// Get from logarithmic division of by value.
public static AmplitudeRatio operator /(AmplitudeRatio left, double right)
{
// Logarithmic division = subtraction
return new AmplitudeRatio(left.Value - (double)right, left.Unit);
}
+ /// Get ratio value from logarithmic division of by .
public static double operator /(AmplitudeRatio left, AmplitudeRatio right)
{
// Logarithmic division = subtraction
@@ -431,36 +438,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Amplit
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(AmplitudeRatio left, AmplitudeRatio right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(AmplitudeRatio left, AmplitudeRatio right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(AmplitudeRatio left, AmplitudeRatio right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(AmplitudeRatio left, AmplitudeRatio right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(AmplitudeRatio left, AmplitudeRatio right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(AmplitudeRatio left, AmplitudeRatio right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -469,11 +485,14 @@ public int CompareTo(object obj)
return CompareTo(objAmplitudeRatio);
}
+ ///
public int CompareTo(AmplitudeRatio other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is AmplitudeRatio objAmplitudeRatio))
@@ -482,6 +501,8 @@ public override bool Equals(object obj)
return Equals(objAmplitudeRatio);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(AmplitudeRatio other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -566,6 +587,7 @@ public double As(AmplitudeRatioUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((AmplitudeRatioUnit) unit);
///
@@ -580,6 +602,7 @@ public AmplitudeRatio ToUnit(AmplitudeRatioUnit unit)
IQuantity IQuantity.ToUnit(AmplitudeRatioUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((AmplitudeRatioUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs
index e1d8582617..eb3306c8b2 100644
--- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In geometry, an angle is the figure formed by two rays, called the sides of the angle, sharing a common endpoint, called the vertex of the angle.
///
@@ -113,14 +114,12 @@ public Angle(double numericValue, AngleUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public AngleUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -500,6 +499,7 @@ public static AngleUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out AngleUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -524,36 +524,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AngleU
#region Arithmetic Operators
+ /// Negate the value.
public static Angle operator -(Angle right)
{
return new Angle(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Angle operator +(Angle left, Angle right)
{
return new Angle(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Angle operator -(Angle left, Angle right)
{
return new Angle(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Angle operator *(double left, Angle right)
{
return new Angle(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Angle operator *(Angle left, double right)
{
return new Angle(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Angle operator /(Angle left, double right)
{
return new Angle(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Angle left, Angle right)
{
return left.Degrees / right.Degrees;
@@ -563,36 +570,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AngleU
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Angle left, Angle right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Angle left, Angle right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Angle left, Angle right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Angle left, Angle right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Angle left, Angle right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Angle left, Angle right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -601,11 +617,14 @@ public int CompareTo(object obj)
return CompareTo(objAngle);
}
+ ///
public int CompareTo(Angle other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Angle objAngle))
@@ -614,6 +633,8 @@ public override bool Equals(object obj)
return Equals(objAngle);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Angle other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -698,6 +719,7 @@ public double As(AngleUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((AngleUnit) unit);
///
@@ -712,6 +734,7 @@ public Angle ToUnit(AngleUnit unit)
IQuantity IQuantity.ToUnit(AngleUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((AngleUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs
index 501c3981e6..f47938bbe5 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs
@@ -28,6 +28,7 @@
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.
///
@@ -113,14 +114,12 @@ public ApparentEnergy(double numericValue, ApparentEnergyUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ApparentEnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -346,6 +345,7 @@ public static ApparentEnergyUnit ParseUnit(string str, IFormatProvider provider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ApparentEnergyUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -370,36 +370,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare
#region Arithmetic Operators
+ /// Negate the value.
public static ApparentEnergy operator -(ApparentEnergy right)
{
return new ApparentEnergy(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ApparentEnergy operator +(ApparentEnergy left, ApparentEnergy right)
{
return new ApparentEnergy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ApparentEnergy operator -(ApparentEnergy left, ApparentEnergy right)
{
return new ApparentEnergy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ApparentEnergy operator *(double left, ApparentEnergy right)
{
return new ApparentEnergy(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ApparentEnergy operator *(ApparentEnergy left, double right)
{
return new ApparentEnergy(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ApparentEnergy operator /(ApparentEnergy left, double right)
{
return new ApparentEnergy(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ApparentEnergy left, ApparentEnergy right)
{
return left.VoltampereHours / right.VoltampereHours;
@@ -409,36 +416,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ApparentEnergy left, ApparentEnergy right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ApparentEnergy left, ApparentEnergy right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ApparentEnergy left, ApparentEnergy right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ApparentEnergy left, ApparentEnergy right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ApparentEnergy left, ApparentEnergy right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ApparentEnergy left, ApparentEnergy right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -447,11 +463,14 @@ public int CompareTo(object obj)
return CompareTo(objApparentEnergy);
}
+ ///
public int CompareTo(ApparentEnergy other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ApparentEnergy objApparentEnergy))
@@ -460,6 +479,8 @@ public override bool Equals(object obj)
return Equals(objApparentEnergy);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ApparentEnergy other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -544,6 +565,7 @@ public double As(ApparentEnergyUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ApparentEnergyUnit) unit);
///
@@ -558,6 +580,7 @@ public ApparentEnergy ToUnit(ApparentEnergyUnit unit)
IQuantity IQuantity.ToUnit(ApparentEnergyUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ApparentEnergyUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs
index 5ab63ac5f8..62dd05784f 100644
--- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs
@@ -28,6 +28,7 @@
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.
///
@@ -113,14 +114,12 @@ public ApparentPower(double numericValue, ApparentPowerUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ApparentPowerUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -360,6 +359,7 @@ public static ApparentPowerUnit ParseUnit(string str, IFormatProvider provider =
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ApparentPowerUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -384,36 +384,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare
#region Arithmetic Operators
+ /// Negate the value.
public static ApparentPower operator -(ApparentPower right)
{
return new ApparentPower(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ApparentPower operator +(ApparentPower left, ApparentPower right)
{
return new ApparentPower(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ApparentPower operator -(ApparentPower left, ApparentPower right)
{
return new ApparentPower(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ApparentPower operator *(double left, ApparentPower right)
{
return new ApparentPower(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ApparentPower operator *(ApparentPower left, double right)
{
return new ApparentPower(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ApparentPower operator /(ApparentPower left, double right)
{
return new ApparentPower(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ApparentPower left, ApparentPower right)
{
return left.Voltamperes / right.Voltamperes;
@@ -423,36 +430,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Appare
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ApparentPower left, ApparentPower right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ApparentPower left, ApparentPower right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ApparentPower left, ApparentPower right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ApparentPower left, ApparentPower right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ApparentPower left, ApparentPower right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ApparentPower left, ApparentPower right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -461,11 +477,14 @@ public int CompareTo(object obj)
return CompareTo(objApparentPower);
}
+ ///
public int CompareTo(ApparentPower other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ApparentPower objApparentPower))
@@ -474,6 +493,8 @@ public override bool Equals(object obj)
return Equals(objApparentPower);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ApparentPower other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -558,6 +579,7 @@ public double As(ApparentPowerUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ApparentPowerUnit) unit);
///
@@ -572,6 +594,7 @@ public ApparentPower ToUnit(ApparentPowerUnit unit)
IQuantity IQuantity.ToUnit(ApparentPowerUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ApparentPowerUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs
index f7ce9926bc..1a2079ca59 100644
--- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Area is a quantity that expresses the extent of a two-dimensional surface or shape, or planar lamina, in the plane. Area can be understood as the amount of material with a given thickness that would be necessary to fashion a model of the shape, or the amount of paint necessary to cover the surface with a single coat.[1] It is the two-dimensional analog of the length of a curve (a one-dimensional concept) or the volume of a solid (a three-dimensional concept).
///
@@ -113,14 +114,12 @@ public Area(double numericValue, AreaUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public AreaUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -486,6 +485,7 @@ public static AreaUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out AreaUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -510,36 +510,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaUn
#region Arithmetic Operators
+ /// Negate the value.
public static Area operator -(Area right)
{
return new Area(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Area operator +(Area left, Area right)
{
return new Area(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Area operator -(Area left, Area right)
{
return new Area(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Area operator *(double left, Area right)
{
return new Area(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Area operator *(Area left, double right)
{
return new Area(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Area operator /(Area left, double right)
{
return new Area(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Area left, Area right)
{
return left.SquareMeters / right.SquareMeters;
@@ -549,36 +556,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaUn
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Area left, Area right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Area left, Area right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Area left, Area right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Area left, Area right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Area left, Area right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Area left, Area right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -587,11 +603,14 @@ public int CompareTo(object obj)
return CompareTo(objArea);
}
+ ///
public int CompareTo(Area other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Area objArea))
@@ -600,6 +619,8 @@ public override bool Equals(object obj)
return Equals(objArea);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Area other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -684,6 +705,7 @@ public double As(AreaUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((AreaUnit) unit);
///
@@ -698,6 +720,7 @@ public Area ToUnit(AreaUnit unit)
IQuantity IQuantity.ToUnit(AreaUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((AreaUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs
index 328b5bfca4..5e7711bcb2 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The area density of a two-dimensional object is calculated as the mass per unit area.
///
@@ -113,14 +114,12 @@ public AreaDensity(double numericValue, AreaDensityUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public AreaDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -318,6 +317,7 @@ public static AreaDensityUnit ParseUnit(string str, IFormatProvider provider = n
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out AreaDensityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -342,36 +342,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaDe
#region Arithmetic Operators
+ /// Negate the value.
public static AreaDensity operator -(AreaDensity right)
{
return new AreaDensity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static AreaDensity operator +(AreaDensity left, AreaDensity right)
{
return new AreaDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static AreaDensity operator -(AreaDensity left, AreaDensity right)
{
return new AreaDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static AreaDensity operator *(double left, AreaDensity right)
{
return new AreaDensity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static AreaDensity operator *(AreaDensity left, double right)
{
return new AreaDensity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static AreaDensity operator /(AreaDensity left, double right)
{
return new AreaDensity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(AreaDensity left, AreaDensity right)
{
return left.KilogramsPerSquareMeter / right.KilogramsPerSquareMeter;
@@ -381,36 +388,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaDe
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(AreaDensity left, AreaDensity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(AreaDensity left, AreaDensity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(AreaDensity left, AreaDensity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(AreaDensity left, AreaDensity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(AreaDensity left, AreaDensity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(AreaDensity left, AreaDensity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -419,11 +435,14 @@ public int CompareTo(object obj)
return CompareTo(objAreaDensity);
}
+ ///
public int CompareTo(AreaDensity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is AreaDensity objAreaDensity))
@@ -432,6 +451,8 @@ public override bool Equals(object obj)
return Equals(objAreaDensity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(AreaDensity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -516,6 +537,7 @@ public double As(AreaDensityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((AreaDensityUnit) unit);
///
@@ -530,6 +552,7 @@ public AreaDensity ToUnit(AreaDensityUnit unit)
IQuantity IQuantity.ToUnit(AreaDensityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((AreaDensityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs
index 00decca729..4d0bad1cd2 100644
--- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// A geometric property of an area that reflects how its points are distributed with regard to an axis.
///
@@ -113,14 +114,12 @@ public AreaMomentOfInertia(double numericValue, AreaMomentOfInertiaUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public AreaMomentOfInertiaUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -388,6 +387,7 @@ public static AreaMomentOfInertiaUnit ParseUnit(string str, IFormatProvider prov
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out AreaMomentOfInertiaUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -412,36 +412,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaMo
#region Arithmetic Operators
+ /// Negate the value.
public static AreaMomentOfInertia operator -(AreaMomentOfInertia right)
{
return new AreaMomentOfInertia(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static AreaMomentOfInertia operator +(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return new AreaMomentOfInertia(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static AreaMomentOfInertia operator -(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return new AreaMomentOfInertia(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static AreaMomentOfInertia operator *(double left, AreaMomentOfInertia right)
{
return new AreaMomentOfInertia(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static AreaMomentOfInertia operator *(AreaMomentOfInertia left, double right)
{
return new AreaMomentOfInertia(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static AreaMomentOfInertia operator /(AreaMomentOfInertia left, double right)
{
return new AreaMomentOfInertia(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return left.MetersToTheFourth / right.MetersToTheFourth;
@@ -451,36 +458,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out AreaMo
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(AreaMomentOfInertia left, AreaMomentOfInertia right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -489,11 +505,14 @@ public int CompareTo(object obj)
return CompareTo(objAreaMomentOfInertia);
}
+ ///
public int CompareTo(AreaMomentOfInertia other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is AreaMomentOfInertia objAreaMomentOfInertia))
@@ -502,6 +521,8 @@ public override bool Equals(object obj)
return Equals(objAreaMomentOfInertia);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(AreaMomentOfInertia other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -586,6 +607,7 @@ public double As(AreaMomentOfInertiaUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((AreaMomentOfInertiaUnit) unit);
///
@@ -600,6 +622,7 @@ public AreaMomentOfInertia ToUnit(AreaMomentOfInertiaUnit unit)
IQuantity IQuantity.ToUnit(AreaMomentOfInertiaUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((AreaMomentOfInertiaUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs
index 98bae3e897..fc2c68d28e 100644
--- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time.
///
@@ -118,14 +119,12 @@ public BitRate(decimal numericValue, BitRateUnit unit)
double IQuantity.Value => (double) _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public BitRateUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -673,6 +672,7 @@ public static BitRateUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out BitRateUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -697,36 +697,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BitRat
#region Arithmetic Operators
+ /// Negate the value.
public static BitRate operator -(BitRate right)
{
return new BitRate(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static BitRate operator +(BitRate left, BitRate right)
{
return new BitRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static BitRate operator -(BitRate left, BitRate right)
{
return new BitRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static BitRate operator *(decimal left, BitRate right)
{
return new BitRate(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static BitRate operator *(BitRate left, decimal right)
{
return new BitRate(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static BitRate operator /(BitRate left, decimal right)
{
return new BitRate(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(BitRate left, BitRate right)
{
return left.BitsPerSecond / right.BitsPerSecond;
@@ -736,36 +743,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BitRat
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(BitRate left, BitRate right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(BitRate left, BitRate right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(BitRate left, BitRate right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(BitRate left, BitRate right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(BitRate left, BitRate right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(BitRate left, BitRate right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -774,11 +790,14 @@ public int CompareTo(object obj)
return CompareTo(objBitRate);
}
+ ///
public int CompareTo(BitRate other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is BitRate objBitRate))
@@ -787,6 +806,8 @@ public override bool Equals(object obj)
return Equals(objBitRate);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(BitRate other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -871,6 +892,7 @@ public double As(BitRateUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((BitRateUnit) unit);
///
@@ -885,6 +907,7 @@ public BitRate ToUnit(BitRateUnit unit)
IQuantity IQuantity.ToUnit(BitRateUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((BitRateUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs
index fd44b8d4b6..fa4a19872e 100644
--- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Brake specific fuel consumption (BSFC) is a measure of the fuel efficiency of any prime mover that burns fuel and produces rotational, or shaft, power. It is typically used for comparing the efficiency of internal combustion engines with a shaft output.
///
@@ -113,14 +114,12 @@ public BrakeSpecificFuelConsumption(double numericValue, BrakeSpecificFuelConsum
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public BrakeSpecificFuelConsumptionUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -346,6 +345,7 @@ public static BrakeSpecificFuelConsumptionUnit ParseUnit(string str, IFormatProv
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out BrakeSpecificFuelConsumptionUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -370,36 +370,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BrakeS
#region Arithmetic Operators
+ /// Negate the value.
public static BrakeSpecificFuelConsumption operator -(BrakeSpecificFuelConsumption right)
{
return new BrakeSpecificFuelConsumption(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static BrakeSpecificFuelConsumption operator +(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return new BrakeSpecificFuelConsumption(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static BrakeSpecificFuelConsumption operator -(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return new BrakeSpecificFuelConsumption(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static BrakeSpecificFuelConsumption operator *(double left, BrakeSpecificFuelConsumption right)
{
return new BrakeSpecificFuelConsumption(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static BrakeSpecificFuelConsumption operator *(BrakeSpecificFuelConsumption left, double right)
{
return new BrakeSpecificFuelConsumption(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static BrakeSpecificFuelConsumption operator /(BrakeSpecificFuelConsumption left, double right)
{
return new BrakeSpecificFuelConsumption(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return left.KilogramsPerJoule / right.KilogramsPerJoule;
@@ -409,36 +416,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out BrakeS
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(BrakeSpecificFuelConsumption left, BrakeSpecificFuelConsumption right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -447,11 +463,14 @@ public int CompareTo(object obj)
return CompareTo(objBrakeSpecificFuelConsumption);
}
+ ///
public int CompareTo(BrakeSpecificFuelConsumption other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is BrakeSpecificFuelConsumption objBrakeSpecificFuelConsumption))
@@ -460,6 +479,8 @@ public override bool Equals(object obj)
return Equals(objBrakeSpecificFuelConsumption);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(BrakeSpecificFuelConsumption other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -544,6 +565,7 @@ public double As(BrakeSpecificFuelConsumptionUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((BrakeSpecificFuelConsumptionUnit) unit);
///
@@ -558,6 +580,7 @@ public BrakeSpecificFuelConsumption ToUnit(BrakeSpecificFuelConsumptionUnit unit
IQuantity IQuantity.ToUnit(BrakeSpecificFuelConsumptionUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((BrakeSpecificFuelConsumptionUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs
index 68ee6ed1fd..a2e5f41682 100644
--- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Capacitance is the ability of a body to store an electric charge.
///
@@ -116,14 +117,12 @@ public Capacitance(double numericValue, CapacitanceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public CapacitanceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -405,6 +404,7 @@ public static CapacitanceUnit ParseUnit(string str, IFormatProvider provider = n
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out CapacitanceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -429,36 +429,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Capaci
#region Arithmetic Operators
+ /// Negate the value.
public static Capacitance operator -(Capacitance right)
{
return new Capacitance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Capacitance operator +(Capacitance left, Capacitance right)
{
return new Capacitance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Capacitance operator -(Capacitance left, Capacitance right)
{
return new Capacitance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Capacitance operator *(double left, Capacitance right)
{
return new Capacitance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Capacitance operator *(Capacitance left, double right)
{
return new Capacitance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Capacitance operator /(Capacitance left, double right)
{
return new Capacitance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Capacitance left, Capacitance right)
{
return left.Farads / right.Farads;
@@ -468,36 +475,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Capaci
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Capacitance left, Capacitance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Capacitance left, Capacitance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Capacitance left, Capacitance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Capacitance left, Capacitance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Capacitance left, Capacitance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Capacitance left, Capacitance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -506,11 +522,14 @@ public int CompareTo(object obj)
return CompareTo(objCapacitance);
}
+ ///
public int CompareTo(Capacitance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Capacitance objCapacitance))
@@ -519,6 +538,8 @@ public override bool Equals(object obj)
return Equals(objCapacitance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Capacitance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -603,6 +624,7 @@ public double As(CapacitanceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((CapacitanceUnit) unit);
///
@@ -617,6 +639,7 @@ public Capacitance ToUnit(CapacitanceUnit unit)
IQuantity IQuantity.ToUnit(CapacitanceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((CapacitanceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs
index 7c809586e0..a0c4779ec7 100644
--- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// A unit that represents a fractional change in size in response to a change in temperature.
///
@@ -113,14 +114,12 @@ public CoefficientOfThermalExpansion(double numericValue, CoefficientOfThermalEx
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public CoefficientOfThermalExpansionUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -346,6 +345,7 @@ public static CoefficientOfThermalExpansionUnit ParseUnit(string str, IFormatPro
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out CoefficientOfThermalExpansionUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -370,36 +370,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Coeffi
#region Arithmetic Operators
+ /// Negate the value.
public static CoefficientOfThermalExpansion operator -(CoefficientOfThermalExpansion right)
{
return new CoefficientOfThermalExpansion(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static CoefficientOfThermalExpansion operator +(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return new CoefficientOfThermalExpansion(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static CoefficientOfThermalExpansion operator -(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return new CoefficientOfThermalExpansion(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static CoefficientOfThermalExpansion operator *(double left, CoefficientOfThermalExpansion right)
{
return new CoefficientOfThermalExpansion(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static CoefficientOfThermalExpansion operator *(CoefficientOfThermalExpansion left, double right)
{
return new CoefficientOfThermalExpansion(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static CoefficientOfThermalExpansion operator /(CoefficientOfThermalExpansion left, double right)
{
return new CoefficientOfThermalExpansion(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return left.InverseKelvin / right.InverseKelvin;
@@ -409,36 +416,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Coeffi
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(CoefficientOfThermalExpansion left, CoefficientOfThermalExpansion right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -447,11 +463,14 @@ public int CompareTo(object obj)
return CompareTo(objCoefficientOfThermalExpansion);
}
+ ///
public int CompareTo(CoefficientOfThermalExpansion other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is CoefficientOfThermalExpansion objCoefficientOfThermalExpansion))
@@ -460,6 +479,8 @@ public override bool Equals(object obj)
return Equals(objCoefficientOfThermalExpansion);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(CoefficientOfThermalExpansion other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -544,6 +565,7 @@ public double As(CoefficientOfThermalExpansionUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((CoefficientOfThermalExpansionUnit) unit);
///
@@ -558,6 +580,7 @@ public CoefficientOfThermalExpansion ToUnit(CoefficientOfThermalExpansionUnit un
IQuantity IQuantity.ToUnit(CoefficientOfThermalExpansionUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((CoefficientOfThermalExpansionUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs
index fc21960355..d2ebdf4d37 100644
--- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The density, or more precisely, the volumetric mass density, of a substance is its mass per unit volume.
///
@@ -116,14 +117,12 @@ public Density(double numericValue, DensityUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public DensityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -853,6 +852,7 @@ public static DensityUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out DensityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -877,36 +877,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Densit
#region Arithmetic Operators
+ /// Negate the value.
public static Density operator -(Density right)
{
return new Density(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Density operator +(Density left, Density right)
{
return new Density(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Density operator -(Density left, Density right)
{
return new Density(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Density operator *(double left, Density right)
{
return new Density(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Density operator *(Density left, double right)
{
return new Density(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Density operator /(Density left, double right)
{
return new Density(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Density left, Density right)
{
return left.KilogramsPerCubicMeter / right.KilogramsPerCubicMeter;
@@ -916,36 +923,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Densit
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Density left, Density right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Density left, Density right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Density left, Density right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Density left, Density right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Density left, Density right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Density left, Density right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -954,11 +970,14 @@ public int CompareTo(object obj)
return CompareTo(objDensity);
}
+ ///
public int CompareTo(Density other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Density objDensity))
@@ -967,6 +986,8 @@ public override bool Equals(object obj)
return Equals(objDensity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Density other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -1051,6 +1072,7 @@ public double As(DensityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((DensityUnit) unit);
///
@@ -1065,6 +1087,7 @@ public Density ToUnit(DensityUnit unit)
IQuantity IQuantity.ToUnit(DensityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((DensityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs
index eb3da47f88..cb7aecedfd 100644
--- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Time is a dimension in which events can be ordered from the past through the present into the future, and also the measure of durations of events and the intervals between them.
///
@@ -113,14 +114,12 @@ public Duration(double numericValue, DurationUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public DurationUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -444,6 +443,7 @@ public static DurationUnit ParseUnit(string str, IFormatProvider provider = null
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out DurationUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -468,36 +468,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Durati
#region Arithmetic Operators
+ /// Negate the value.
public static Duration operator -(Duration right)
{
return new Duration(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Duration operator +(Duration left, Duration right)
{
return new Duration(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Duration operator -(Duration left, Duration right)
{
return new Duration(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Duration operator *(double left, Duration right)
{
return new Duration(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Duration operator *(Duration left, double right)
{
return new Duration(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Duration operator /(Duration left, double right)
{
return new Duration(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Duration left, Duration right)
{
return left.Seconds / right.Seconds;
@@ -507,36 +514,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Durati
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Duration left, Duration right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Duration left, Duration right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Duration left, Duration right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Duration left, Duration right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Duration left, Duration right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Duration left, Duration right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -545,11 +561,14 @@ public int CompareTo(object obj)
return CompareTo(objDuration);
}
+ ///
public int CompareTo(Duration other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Duration objDuration))
@@ -558,6 +577,8 @@ public override bool Equals(object obj)
return Equals(objDuration);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Duration other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -642,6 +663,7 @@ public double As(DurationUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((DurationUnit) unit);
///
@@ -656,6 +678,7 @@ public Duration ToUnit(DurationUnit unit)
IQuantity IQuantity.ToUnit(DurationUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((DurationUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs
index c2bcc3d136..c39ce9a61b 100644
--- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The dynamic (shear) viscosity of a fluid expresses its resistance to shearing flows, where adjacent layers move parallel to each other with different speeds
///
@@ -116,14 +117,12 @@ public DynamicViscosity(double numericValue, DynamicViscosityUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public DynamicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -391,6 +390,7 @@ public static DynamicViscosityUnit ParseUnit(string str, IFormatProvider provide
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out DynamicViscosityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -415,36 +415,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Dynami
#region Arithmetic Operators
+ /// Negate the value.
public static DynamicViscosity operator -(DynamicViscosity right)
{
return new DynamicViscosity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static DynamicViscosity operator +(DynamicViscosity left, DynamicViscosity right)
{
return new DynamicViscosity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static DynamicViscosity operator -(DynamicViscosity left, DynamicViscosity right)
{
return new DynamicViscosity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static DynamicViscosity operator *(double left, DynamicViscosity right)
{
return new DynamicViscosity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static DynamicViscosity operator *(DynamicViscosity left, double right)
{
return new DynamicViscosity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static DynamicViscosity operator /(DynamicViscosity left, double right)
{
return new DynamicViscosity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(DynamicViscosity left, DynamicViscosity right)
{
return left.NewtonSecondsPerMeterSquared / right.NewtonSecondsPerMeterSquared;
@@ -454,36 +461,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Dynami
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(DynamicViscosity left, DynamicViscosity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(DynamicViscosity left, DynamicViscosity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(DynamicViscosity left, DynamicViscosity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(DynamicViscosity left, DynamicViscosity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(DynamicViscosity left, DynamicViscosity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(DynamicViscosity left, DynamicViscosity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -492,11 +508,14 @@ public int CompareTo(object obj)
return CompareTo(objDynamicViscosity);
}
+ ///
public int CompareTo(DynamicViscosity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is DynamicViscosity objDynamicViscosity))
@@ -505,6 +524,8 @@ public override bool Equals(object obj)
return Equals(objDynamicViscosity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(DynamicViscosity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -589,6 +610,7 @@ public double As(DynamicViscosityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((DynamicViscosityUnit) unit);
///
@@ -603,6 +625,7 @@ public DynamicViscosity ToUnit(DynamicViscosityUnit unit)
IQuantity IQuantity.ToUnit(DynamicViscosityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((DynamicViscosityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs
index e1713af937..a075b8cb60 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs
@@ -28,6 +28,7 @@
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).
///
@@ -113,14 +114,12 @@ public ElectricAdmittance(double numericValue, ElectricAdmittanceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricAdmittanceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -360,6 +359,7 @@ public static ElectricAdmittanceUnit ParseUnit(string str, IFormatProvider provi
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricAdmittanceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -384,36 +384,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricAdmittance operator -(ElectricAdmittance right)
{
return new ElectricAdmittance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricAdmittance operator +(ElectricAdmittance left, ElectricAdmittance right)
{
return new ElectricAdmittance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricAdmittance operator -(ElectricAdmittance left, ElectricAdmittance right)
{
return new ElectricAdmittance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricAdmittance operator *(double left, ElectricAdmittance right)
{
return new ElectricAdmittance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricAdmittance operator *(ElectricAdmittance left, double right)
{
return new ElectricAdmittance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricAdmittance operator /(ElectricAdmittance left, double right)
{
return new ElectricAdmittance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricAdmittance left, ElectricAdmittance right)
{
return left.Siemens / right.Siemens;
@@ -423,36 +430,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricAdmittance left, ElectricAdmittance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricAdmittance left, ElectricAdmittance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricAdmittance left, ElectricAdmittance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricAdmittance left, ElectricAdmittance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricAdmittance left, ElectricAdmittance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricAdmittance left, ElectricAdmittance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -461,11 +477,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricAdmittance);
}
+ ///
public int CompareTo(ElectricAdmittance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricAdmittance objElectricAdmittance))
@@ -474,6 +493,8 @@ public override bool Equals(object obj)
return Equals(objElectricAdmittance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricAdmittance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -558,6 +579,7 @@ public double As(ElectricAdmittanceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricAdmittanceUnit) unit);
///
@@ -572,6 +594,7 @@ public ElectricAdmittance ToUnit(ElectricAdmittanceUnit unit)
IQuantity IQuantity.ToUnit(ElectricAdmittanceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricAdmittanceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs
index 778a74ad80..11e2ffab74 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Electric charge is the physical property of matter that causes it to experience a force when placed in an electromagnetic field.
///
@@ -116,14 +117,12 @@ public ElectricCharge(double numericValue, ElectricChargeUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricChargeUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -321,6 +320,7 @@ public static ElectricChargeUnit ParseUnit(string str, IFormatProvider provider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricChargeUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -345,36 +345,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricCharge operator -(ElectricCharge right)
{
return new ElectricCharge(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricCharge operator +(ElectricCharge left, ElectricCharge right)
{
return new ElectricCharge(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricCharge operator -(ElectricCharge left, ElectricCharge right)
{
return new ElectricCharge(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCharge operator *(double left, ElectricCharge right)
{
return new ElectricCharge(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCharge operator *(ElectricCharge left, double right)
{
return new ElectricCharge(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricCharge operator /(ElectricCharge left, double right)
{
return new ElectricCharge(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricCharge left, ElectricCharge right)
{
return left.Coulombs / right.Coulombs;
@@ -384,36 +391,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricCharge left, ElectricCharge right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricCharge left, ElectricCharge right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricCharge left, ElectricCharge right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricCharge left, ElectricCharge right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricCharge left, ElectricCharge right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricCharge left, ElectricCharge right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -422,11 +438,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricCharge);
}
+ ///
public int CompareTo(ElectricCharge other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricCharge objElectricCharge))
@@ -435,6 +454,8 @@ public override bool Equals(object obj)
return Equals(objElectricCharge);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricCharge other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -519,6 +540,7 @@ public double As(ElectricChargeUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricChargeUnit) unit);
///
@@ -533,6 +555,7 @@ public ElectricCharge ToUnit(ElectricChargeUnit unit)
IQuantity IQuantity.ToUnit(ElectricChargeUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs
index 8333253303..47f100ad60 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In electromagnetism, charge density is a measure of the amount of electric charge per unit length, surface area, or volume.
///
@@ -116,14 +117,12 @@ public ElectricChargeDensity(double numericValue, ElectricChargeDensityUnit unit
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricChargeDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -321,6 +320,7 @@ public static ElectricChargeDensityUnit ParseUnit(string str, IFormatProvider pr
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricChargeDensityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -345,36 +345,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricChargeDensity operator -(ElectricChargeDensity right)
{
return new ElectricChargeDensity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricChargeDensity operator +(ElectricChargeDensity left, ElectricChargeDensity right)
{
return new ElectricChargeDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricChargeDensity operator -(ElectricChargeDensity left, ElectricChargeDensity right)
{
return new ElectricChargeDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricChargeDensity operator *(double left, ElectricChargeDensity right)
{
return new ElectricChargeDensity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricChargeDensity operator *(ElectricChargeDensity left, double right)
{
return new ElectricChargeDensity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricChargeDensity operator /(ElectricChargeDensity left, double right)
{
return new ElectricChargeDensity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricChargeDensity left, ElectricChargeDensity right)
{
return left.CoulombsPerCubicMeter / right.CoulombsPerCubicMeter;
@@ -384,36 +391,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricChargeDensity left, ElectricChargeDensity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricChargeDensity left, ElectricChargeDensity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricChargeDensity left, ElectricChargeDensity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricChargeDensity left, ElectricChargeDensity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricChargeDensity left, ElectricChargeDensity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricChargeDensity left, ElectricChargeDensity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -422,11 +438,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricChargeDensity);
}
+ ///
public int CompareTo(ElectricChargeDensity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricChargeDensity objElectricChargeDensity))
@@ -435,6 +454,8 @@ public override bool Equals(object obj)
return Equals(objElectricChargeDensity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricChargeDensity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -519,6 +540,7 @@ public double As(ElectricChargeDensityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricChargeDensityUnit) unit);
///
@@ -533,6 +555,7 @@ public ElectricChargeDensity ToUnit(ElectricChargeDensityUnit unit)
IQuantity IQuantity.ToUnit(ElectricChargeDensityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricChargeDensityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs
index 85e771c45f..c64e25ad4b 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The electrical conductance of an electrical conductor is a measure of the easeness to pass an electric current through that conductor.
///
@@ -116,14 +117,12 @@ public ElectricConductance(double numericValue, ElectricConductanceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricConductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -349,6 +348,7 @@ public static ElectricConductanceUnit ParseUnit(string str, IFormatProvider prov
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricConductanceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -373,36 +373,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricConductance operator -(ElectricConductance right)
{
return new ElectricConductance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricConductance operator +(ElectricConductance left, ElectricConductance right)
{
return new ElectricConductance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricConductance operator -(ElectricConductance left, ElectricConductance right)
{
return new ElectricConductance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricConductance operator *(double left, ElectricConductance right)
{
return new ElectricConductance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricConductance operator *(ElectricConductance left, double right)
{
return new ElectricConductance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricConductance operator /(ElectricConductance left, double right)
{
return new ElectricConductance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricConductance left, ElectricConductance right)
{
return left.Siemens / right.Siemens;
@@ -412,36 +419,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricConductance left, ElectricConductance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricConductance left, ElectricConductance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricConductance left, ElectricConductance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricConductance left, ElectricConductance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricConductance left, ElectricConductance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricConductance left, ElectricConductance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -450,11 +466,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricConductance);
}
+ ///
public int CompareTo(ElectricConductance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricConductance objElectricConductance))
@@ -463,6 +482,8 @@ public override bool Equals(object obj)
return Equals(objElectricConductance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricConductance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -547,6 +568,7 @@ public double As(ElectricConductanceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricConductanceUnit) unit);
///
@@ -561,6 +583,7 @@ public ElectricConductance ToUnit(ElectricConductanceUnit unit)
IQuantity IQuantity.ToUnit(ElectricConductanceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductanceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs
index a38424501d..5b883b3cda 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Electrical conductivity or specific conductance is the reciprocal of electrical resistivity, and measures a material's ability to conduct an electric current.
///
@@ -116,14 +117,12 @@ public ElectricConductivity(double numericValue, ElectricConductivityUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricConductivityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -321,6 +320,7 @@ public static ElectricConductivityUnit ParseUnit(string str, IFormatProvider pro
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricConductivityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -345,36 +345,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricConductivity operator -(ElectricConductivity right)
{
return new ElectricConductivity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricConductivity operator +(ElectricConductivity left, ElectricConductivity right)
{
return new ElectricConductivity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricConductivity operator -(ElectricConductivity left, ElectricConductivity right)
{
return new ElectricConductivity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricConductivity operator *(double left, ElectricConductivity right)
{
return new ElectricConductivity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricConductivity operator *(ElectricConductivity left, double right)
{
return new ElectricConductivity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricConductivity operator /(ElectricConductivity left, double right)
{
return new ElectricConductivity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricConductivity left, ElectricConductivity right)
{
return left.SiemensPerMeter / right.SiemensPerMeter;
@@ -384,36 +391,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricConductivity left, ElectricConductivity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricConductivity left, ElectricConductivity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricConductivity left, ElectricConductivity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricConductivity left, ElectricConductivity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricConductivity left, ElectricConductivity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricConductivity left, ElectricConductivity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -422,11 +438,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricConductivity);
}
+ ///
public int CompareTo(ElectricConductivity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricConductivity objElectricConductivity))
@@ -435,6 +454,8 @@ public override bool Equals(object obj)
return Equals(objElectricConductivity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricConductivity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -519,6 +540,7 @@ public double As(ElectricConductivityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricConductivityUnit) unit);
///
@@ -533,6 +555,7 @@ public ElectricConductivity ToUnit(ElectricConductivityUnit unit)
IQuantity IQuantity.ToUnit(ElectricConductivityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricConductivityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs
index 74b5fca89e..7e57aa3a03 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs
@@ -28,6 +28,7 @@
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.
///
@@ -113,14 +114,12 @@ public ElectricCurrent(double numericValue, ElectricCurrentUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricCurrentUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -416,6 +415,7 @@ public static ElectricCurrentUnit ParseUnit(string str, IFormatProvider provider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricCurrentUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -440,36 +440,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricCurrent operator -(ElectricCurrent right)
{
return new ElectricCurrent(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricCurrent operator +(ElectricCurrent left, ElectricCurrent right)
{
return new ElectricCurrent(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricCurrent operator -(ElectricCurrent left, ElectricCurrent right)
{
return new ElectricCurrent(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCurrent operator *(double left, ElectricCurrent right)
{
return new ElectricCurrent(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCurrent operator *(ElectricCurrent left, double right)
{
return new ElectricCurrent(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricCurrent operator /(ElectricCurrent left, double right)
{
return new ElectricCurrent(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricCurrent left, ElectricCurrent right)
{
return left.Amperes / right.Amperes;
@@ -479,36 +486,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricCurrent left, ElectricCurrent right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricCurrent left, ElectricCurrent right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricCurrent left, ElectricCurrent right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricCurrent left, ElectricCurrent right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricCurrent left, ElectricCurrent right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricCurrent left, ElectricCurrent right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -517,11 +533,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricCurrent);
}
+ ///
public int CompareTo(ElectricCurrent other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricCurrent objElectricCurrent))
@@ -530,6 +549,8 @@ public override bool Equals(object obj)
return Equals(objElectricCurrent);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricCurrent other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -614,6 +635,7 @@ public double As(ElectricCurrentUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricCurrentUnit) unit);
///
@@ -628,6 +650,7 @@ public ElectricCurrent ToUnit(ElectricCurrentUnit unit)
IQuantity IQuantity.ToUnit(ElectricCurrentUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs
index fd1546d955..6e6324052a 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In electromagnetism, current density is the electric current per unit area of cross section.
///
@@ -116,14 +117,12 @@ public ElectricCurrentDensity(double numericValue, ElectricCurrentDensityUnit un
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricCurrentDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -321,6 +320,7 @@ public static ElectricCurrentDensityUnit ParseUnit(string str, IFormatProvider p
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricCurrentDensityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -345,36 +345,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricCurrentDensity operator -(ElectricCurrentDensity right)
{
return new ElectricCurrentDensity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricCurrentDensity operator +(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return new ElectricCurrentDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricCurrentDensity operator -(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return new ElectricCurrentDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCurrentDensity operator *(double left, ElectricCurrentDensity right)
{
return new ElectricCurrentDensity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCurrentDensity operator *(ElectricCurrentDensity left, double right)
{
return new ElectricCurrentDensity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricCurrentDensity operator /(ElectricCurrentDensity left, double right)
{
return new ElectricCurrentDensity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return left.AmperesPerSquareMeter / right.AmperesPerSquareMeter;
@@ -384,36 +391,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricCurrentDensity left, ElectricCurrentDensity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -422,11 +438,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricCurrentDensity);
}
+ ///
public int CompareTo(ElectricCurrentDensity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricCurrentDensity objElectricCurrentDensity))
@@ -435,6 +454,8 @@ public override bool Equals(object obj)
return Equals(objElectricCurrentDensity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricCurrentDensity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -519,6 +540,7 @@ public double As(ElectricCurrentDensityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricCurrentDensityUnit) unit);
///
@@ -533,6 +555,7 @@ public ElectricCurrentDensity ToUnit(ElectricCurrentDensityUnit unit)
IQuantity IQuantity.ToUnit(ElectricCurrentDensityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentDensityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs
index 3e55087374..99a7c5b70b 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In electromagnetism, the current gradient describes how the current changes in time.
///
@@ -113,14 +114,12 @@ public ElectricCurrentGradient(double numericValue, ElectricCurrentGradientUnit
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricCurrentGradientUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -318,6 +317,7 @@ public static ElectricCurrentGradientUnit ParseUnit(string str, IFormatProvider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricCurrentGradientUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -342,36 +342,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricCurrentGradient operator -(ElectricCurrentGradient right)
{
return new ElectricCurrentGradient(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricCurrentGradient operator +(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return new ElectricCurrentGradient(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricCurrentGradient operator -(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return new ElectricCurrentGradient(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCurrentGradient operator *(double left, ElectricCurrentGradient right)
{
return new ElectricCurrentGradient(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricCurrentGradient operator *(ElectricCurrentGradient left, double right)
{
return new ElectricCurrentGradient(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricCurrentGradient operator /(ElectricCurrentGradient left, double right)
{
return new ElectricCurrentGradient(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return left.AmperesPerSecond / right.AmperesPerSecond;
@@ -381,36 +388,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricCurrentGradient left, ElectricCurrentGradient right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -419,11 +435,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricCurrentGradient);
}
+ ///
public int CompareTo(ElectricCurrentGradient other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricCurrentGradient objElectricCurrentGradient))
@@ -432,6 +451,8 @@ public override bool Equals(object obj)
return Equals(objElectricCurrentGradient);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricCurrentGradient other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -516,6 +537,7 @@ public double As(ElectricCurrentGradientUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricCurrentGradientUnit) unit);
///
@@ -530,6 +552,7 @@ public ElectricCurrentGradient ToUnit(ElectricCurrentGradientUnit unit)
IQuantity IQuantity.ToUnit(ElectricCurrentGradientUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricCurrentGradientUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs
index 8a8b59f436..5256568249 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// An electric field is a force field that surrounds electric charges that attracts or repels other electric charges.
///
@@ -116,14 +117,12 @@ public ElectricField(double numericValue, ElectricFieldUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricFieldUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -321,6 +320,7 @@ public static ElectricFieldUnit ParseUnit(string str, IFormatProvider provider =
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricFieldUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -345,36 +345,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricField operator -(ElectricField right)
{
return new ElectricField(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricField operator +(ElectricField left, ElectricField right)
{
return new ElectricField(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricField operator -(ElectricField left, ElectricField right)
{
return new ElectricField(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricField operator *(double left, ElectricField right)
{
return new ElectricField(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricField operator *(ElectricField left, double right)
{
return new ElectricField(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricField operator /(ElectricField left, double right)
{
return new ElectricField(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricField left, ElectricField right)
{
return left.VoltsPerMeter / right.VoltsPerMeter;
@@ -384,36 +391,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricField left, ElectricField right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricField left, ElectricField right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricField left, ElectricField right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricField left, ElectricField right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricField left, ElectricField right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricField left, ElectricField right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -422,11 +438,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricField);
}
+ ///
public int CompareTo(ElectricField other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricField objElectricField))
@@ -435,6 +454,8 @@ public override bool Equals(object obj)
return Equals(objElectricField);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricField other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -519,6 +540,7 @@ public double As(ElectricFieldUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricFieldUnit) unit);
///
@@ -533,6 +555,7 @@ public ElectricField ToUnit(ElectricFieldUnit unit)
IQuantity IQuantity.ToUnit(ElectricFieldUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricFieldUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs
index 8d1eaa6b39..17bbbb2171 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Inductance is a property of an electrical conductor which opposes a change in current.
///
@@ -116,14 +117,12 @@ public ElectricInductance(double numericValue, ElectricInductanceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricInductanceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -363,6 +362,7 @@ public static ElectricInductanceUnit ParseUnit(string str, IFormatProvider provi
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricInductanceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -387,36 +387,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricInductance operator -(ElectricInductance right)
{
return new ElectricInductance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricInductance operator +(ElectricInductance left, ElectricInductance right)
{
return new ElectricInductance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricInductance operator -(ElectricInductance left, ElectricInductance right)
{
return new ElectricInductance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricInductance operator *(double left, ElectricInductance right)
{
return new ElectricInductance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricInductance operator *(ElectricInductance left, double right)
{
return new ElectricInductance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricInductance operator /(ElectricInductance left, double right)
{
return new ElectricInductance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricInductance left, ElectricInductance right)
{
return left.Henries / right.Henries;
@@ -426,36 +433,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricInductance left, ElectricInductance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricInductance left, ElectricInductance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricInductance left, ElectricInductance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricInductance left, ElectricInductance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricInductance left, ElectricInductance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricInductance left, ElectricInductance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -464,11 +480,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricInductance);
}
+ ///
public int CompareTo(ElectricInductance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricInductance objElectricInductance))
@@ -477,6 +496,8 @@ public override bool Equals(object obj)
return Equals(objElectricInductance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricInductance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -561,6 +582,7 @@ public double As(ElectricInductanceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricInductanceUnit) unit);
///
@@ -575,6 +597,7 @@ public ElectricInductance ToUnit(ElectricInductanceUnit unit)
IQuantity IQuantity.ToUnit(ElectricInductanceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricInductanceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs
index f797aac25b..aaed1a740d 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs
@@ -28,6 +28,7 @@
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.
///
@@ -113,14 +114,12 @@ public ElectricPotential(double numericValue, ElectricPotentialUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricPotentialUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -374,6 +373,7 @@ public static ElectricPotentialUnit ParseUnit(string str, IFormatProvider provid
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricPotentialUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -398,36 +398,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricPotential operator -(ElectricPotential right)
{
return new ElectricPotential(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricPotential operator +(ElectricPotential left, ElectricPotential right)
{
return new ElectricPotential(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricPotential operator -(ElectricPotential left, ElectricPotential right)
{
return new ElectricPotential(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricPotential operator *(double left, ElectricPotential right)
{
return new ElectricPotential(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricPotential operator *(ElectricPotential left, double right)
{
return new ElectricPotential(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricPotential operator /(ElectricPotential left, double right)
{
return new ElectricPotential(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricPotential left, ElectricPotential right)
{
return left.Volts / right.Volts;
@@ -437,36 +444,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricPotential left, ElectricPotential right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricPotential left, ElectricPotential right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricPotential left, ElectricPotential right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricPotential left, ElectricPotential right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricPotential left, ElectricPotential right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricPotential left, ElectricPotential right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -475,11 +491,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricPotential);
}
+ ///
public int CompareTo(ElectricPotential other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricPotential objElectricPotential))
@@ -488,6 +507,8 @@ public override bool Equals(object obj)
return Equals(objElectricPotential);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricPotential other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -572,6 +593,7 @@ public double As(ElectricPotentialUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricPotentialUnit) unit);
///
@@ -586,6 +608,7 @@ public ElectricPotential ToUnit(ElectricPotentialUnit unit)
IQuantity IQuantity.ToUnit(ElectricPotentialUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs
index 2e79686f89..a274445ba1 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The Electric Potential of a system known to use Alternating Current.
///
@@ -113,14 +114,12 @@ public ElectricPotentialAc(double numericValue, ElectricPotentialAcUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricPotentialAcUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -374,6 +373,7 @@ public static ElectricPotentialAcUnit ParseUnit(string str, IFormatProvider prov
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricPotentialAcUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -398,36 +398,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricPotentialAc operator -(ElectricPotentialAc right)
{
return new ElectricPotentialAc(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricPotentialAc operator +(ElectricPotentialAc left, ElectricPotentialAc right)
{
return new ElectricPotentialAc(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricPotentialAc operator -(ElectricPotentialAc left, ElectricPotentialAc right)
{
return new ElectricPotentialAc(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricPotentialAc operator *(double left, ElectricPotentialAc right)
{
return new ElectricPotentialAc(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricPotentialAc operator *(ElectricPotentialAc left, double right)
{
return new ElectricPotentialAc(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricPotentialAc operator /(ElectricPotentialAc left, double right)
{
return new ElectricPotentialAc(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricPotentialAc left, ElectricPotentialAc right)
{
return left.VoltsAc / right.VoltsAc;
@@ -437,36 +444,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricPotentialAc left, ElectricPotentialAc right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricPotentialAc left, ElectricPotentialAc right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricPotentialAc left, ElectricPotentialAc right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricPotentialAc left, ElectricPotentialAc right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricPotentialAc left, ElectricPotentialAc right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricPotentialAc left, ElectricPotentialAc right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -475,11 +491,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricPotentialAc);
}
+ ///
public int CompareTo(ElectricPotentialAc other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricPotentialAc objElectricPotentialAc))
@@ -488,6 +507,8 @@ public override bool Equals(object obj)
return Equals(objElectricPotentialAc);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricPotentialAc other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -572,6 +593,7 @@ public double As(ElectricPotentialAcUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricPotentialAcUnit) unit);
///
@@ -586,6 +608,7 @@ public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit)
IQuantity IQuantity.ToUnit(ElectricPotentialAcUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialAcUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs
index 5765f4e2d2..13f84796cf 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The Electric Potential of a system known to use Direct Current.
///
@@ -113,14 +114,12 @@ public ElectricPotentialDc(double numericValue, ElectricPotentialDcUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricPotentialDcUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -374,6 +373,7 @@ public static ElectricPotentialDcUnit ParseUnit(string str, IFormatProvider prov
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricPotentialDcUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -398,36 +398,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricPotentialDc operator -(ElectricPotentialDc right)
{
return new ElectricPotentialDc(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricPotentialDc operator +(ElectricPotentialDc left, ElectricPotentialDc right)
{
return new ElectricPotentialDc(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricPotentialDc operator -(ElectricPotentialDc left, ElectricPotentialDc right)
{
return new ElectricPotentialDc(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricPotentialDc operator *(double left, ElectricPotentialDc right)
{
return new ElectricPotentialDc(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricPotentialDc operator *(ElectricPotentialDc left, double right)
{
return new ElectricPotentialDc(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricPotentialDc operator /(ElectricPotentialDc left, double right)
{
return new ElectricPotentialDc(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricPotentialDc left, ElectricPotentialDc right)
{
return left.VoltsDc / right.VoltsDc;
@@ -437,36 +444,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricPotentialDc left, ElectricPotentialDc right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricPotentialDc left, ElectricPotentialDc right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricPotentialDc left, ElectricPotentialDc right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricPotentialDc left, ElectricPotentialDc right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricPotentialDc left, ElectricPotentialDc right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricPotentialDc left, ElectricPotentialDc right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -475,11 +491,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricPotentialDc);
}
+ ///
public int CompareTo(ElectricPotentialDc other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricPotentialDc objElectricPotentialDc))
@@ -488,6 +507,8 @@ public override bool Equals(object obj)
return Equals(objElectricPotentialDc);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricPotentialDc other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -572,6 +593,7 @@ public double As(ElectricPotentialDcUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricPotentialDcUnit) unit);
///
@@ -586,6 +608,7 @@ public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit)
IQuantity IQuantity.ToUnit(ElectricPotentialDcUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricPotentialDcUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs
index d87ef748ed..434512c262 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The electrical resistance of an electrical conductor is the opposition to the passage of an electric current through that conductor.
///
@@ -113,14 +114,12 @@ public ElectricResistance(double numericValue, ElectricResistanceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricResistanceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -374,6 +373,7 @@ public static ElectricResistanceUnit ParseUnit(string str, IFormatProvider provi
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricResistanceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -398,36 +398,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricResistance operator -(ElectricResistance right)
{
return new ElectricResistance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricResistance operator +(ElectricResistance left, ElectricResistance right)
{
return new ElectricResistance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricResistance operator -(ElectricResistance left, ElectricResistance right)
{
return new ElectricResistance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricResistance operator *(double left, ElectricResistance right)
{
return new ElectricResistance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricResistance operator *(ElectricResistance left, double right)
{
return new ElectricResistance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricResistance operator /(ElectricResistance left, double right)
{
return new ElectricResistance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricResistance left, ElectricResistance right)
{
return left.Ohms / right.Ohms;
@@ -437,36 +444,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricResistance left, ElectricResistance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricResistance left, ElectricResistance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricResistance left, ElectricResistance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricResistance left, ElectricResistance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricResistance left, ElectricResistance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricResistance left, ElectricResistance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -475,11 +491,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricResistance);
}
+ ///
public int CompareTo(ElectricResistance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricResistance objElectricResistance))
@@ -488,6 +507,8 @@ public override bool Equals(object obj)
return Equals(objElectricResistance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricResistance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -572,6 +593,7 @@ public double As(ElectricResistanceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricResistanceUnit) unit);
///
@@ -586,6 +608,7 @@ public ElectricResistance ToUnit(ElectricResistanceUnit unit)
IQuantity IQuantity.ToUnit(ElectricResistanceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistanceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs
index 820cdaa8fa..a22afad67d 100644
--- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Electrical resistivity (also known as resistivity, specific electrical resistance, or volume resistivity) is a fundamental property that quantifies how strongly a given material opposes the flow of electric current.
///
@@ -116,14 +117,12 @@ public ElectricResistivity(double numericValue, ElectricResistivityUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ElectricResistivityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -503,6 +502,7 @@ public static ElectricResistivityUnit ParseUnit(string str, IFormatProvider prov
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ElectricResistivityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -527,36 +527,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Arithmetic Operators
+ /// Negate the value.
public static ElectricResistivity operator -(ElectricResistivity right)
{
return new ElectricResistivity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ElectricResistivity operator +(ElectricResistivity left, ElectricResistivity right)
{
return new ElectricResistivity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ElectricResistivity operator -(ElectricResistivity left, ElectricResistivity right)
{
return new ElectricResistivity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ElectricResistivity operator *(double left, ElectricResistivity right)
{
return new ElectricResistivity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ElectricResistivity operator *(ElectricResistivity left, double right)
{
return new ElectricResistivity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ElectricResistivity operator /(ElectricResistivity left, double right)
{
return new ElectricResistivity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ElectricResistivity left, ElectricResistivity right)
{
return left.OhmMeters / right.OhmMeters;
@@ -566,36 +573,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Electr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ElectricResistivity left, ElectricResistivity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ElectricResistivity left, ElectricResistivity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ElectricResistivity left, ElectricResistivity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ElectricResistivity left, ElectricResistivity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ElectricResistivity left, ElectricResistivity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ElectricResistivity left, ElectricResistivity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -604,11 +620,14 @@ public int CompareTo(object obj)
return CompareTo(objElectricResistivity);
}
+ ///
public int CompareTo(ElectricResistivity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ElectricResistivity objElectricResistivity))
@@ -617,6 +636,8 @@ public override bool Equals(object obj)
return Equals(objElectricResistivity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ElectricResistivity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -701,6 +722,7 @@ public double As(ElectricResistivityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ElectricResistivityUnit) unit);
///
@@ -715,6 +737,7 @@ public ElectricResistivity ToUnit(ElectricResistivityUnit unit)
IQuantity IQuantity.ToUnit(ElectricResistivityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ElectricResistivityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs
index cebe402b97..8eddad2061 100644
--- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The joule, symbol J, is a derived unit of energy, work, or amount of heat in the International System of Units. It is equal to the energy transferred (or work done) when applying a force of one newton through a distance of one metre (1 newton metre or N·m), or in passing an electric current of one ampere through a resistance of one ohm for one second. Many other units of energy are included. Please do not confuse this definition of the calorie with the one colloquially used by the food industry, the large calorie, which is equivalent to 1 kcal. Thermochemical definition of the calorie is used. For BTU, the IT definition is used.
///
@@ -113,14 +114,12 @@ public Energy(double numericValue, EnergyUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public EnergyUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -626,6 +625,7 @@ public static EnergyUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out EnergyUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -650,36 +650,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Energy
#region Arithmetic Operators
+ /// Negate the value.
public static Energy operator -(Energy right)
{
return new Energy(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Energy operator +(Energy left, Energy right)
{
return new Energy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Energy operator -(Energy left, Energy right)
{
return new Energy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Energy operator *(double left, Energy right)
{
return new Energy(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Energy operator *(Energy left, double right)
{
return new Energy(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Energy operator /(Energy left, double right)
{
return new Energy(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Energy left, Energy right)
{
return left.Joules / right.Joules;
@@ -689,36 +696,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Energy
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Energy left, Energy right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Energy left, Energy right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Energy left, Energy right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Energy left, Energy right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Energy left, Energy right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Energy left, Energy right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -727,11 +743,14 @@ public int CompareTo(object obj)
return CompareTo(objEnergy);
}
+ ///
public int CompareTo(Energy other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Energy objEnergy))
@@ -740,6 +759,8 @@ public override bool Equals(object obj)
return Equals(objEnergy);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Energy other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -824,6 +845,7 @@ public double As(EnergyUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((EnergyUnit) unit);
///
@@ -838,6 +860,7 @@ public Energy ToUnit(EnergyUnit unit)
IQuantity IQuantity.ToUnit(EnergyUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((EnergyUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs
index 19f14316dd..e7614d763f 100644
--- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Entropy is an important concept in the branch of science known as thermodynamics. The idea of "irreversibility" is central to the understanding of entropy. It is often said that entropy is an expression of the disorder, or randomness of a system, or of our lack of information about it. Entropy is an extensive property. It has the dimension of energy divided by temperature, which has a unit of joules per kelvin (J/K) in the International System of Units
///
@@ -113,14 +114,12 @@ public Entropy(double numericValue, EntropyUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public EntropyUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -402,6 +401,7 @@ public static EntropyUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out EntropyUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -426,36 +426,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Entrop
#region Arithmetic Operators
+ /// Negate the value.
public static Entropy operator -(Entropy right)
{
return new Entropy(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Entropy operator +(Entropy left, Entropy right)
{
return new Entropy(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Entropy operator -(Entropy left, Entropy right)
{
return new Entropy(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Entropy operator *(double left, Entropy right)
{
return new Entropy(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Entropy operator *(Entropy left, double right)
{
return new Entropy(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Entropy operator /(Entropy left, double right)
{
return new Entropy(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Entropy left, Entropy right)
{
return left.JoulesPerKelvin / right.JoulesPerKelvin;
@@ -465,36 +472,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Entrop
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Entropy left, Entropy right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Entropy left, Entropy right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Entropy left, Entropy right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Entropy left, Entropy right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Entropy left, Entropy right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Entropy left, Entropy right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -503,11 +519,14 @@ public int CompareTo(object obj)
return CompareTo(objEntropy);
}
+ ///
public int CompareTo(Entropy other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Entropy objEntropy))
@@ -516,6 +535,8 @@ public override bool Equals(object obj)
return Equals(objEntropy);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Entropy other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -600,6 +621,7 @@ public double As(EntropyUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((EntropyUnit) unit);
///
@@ -614,6 +636,7 @@ public Entropy ToUnit(EntropyUnit unit)
IQuantity IQuantity.ToUnit(EntropyUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((EntropyUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs
index adfe006436..343209e2ab 100644
--- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In physics, a force is any influence that causes an object to undergo a certain change, either concerning its movement, direction, or geometrical construction. In other words, a force can cause an object with mass to change its velocity (which includes to begin moving from a state of rest), i.e., to accelerate, or a flexible object to deform, or both. Force can also be described by intuitive concepts such as a push or a pull. A force has both magnitude and direction, making it a vector quantity. It is measured in the SI unit of newtons and represented by the symbol F.
///
@@ -113,14 +114,12 @@ public Force(double numericValue, ForceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ForceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -486,6 +485,7 @@ public static ForceUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ForceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -510,36 +510,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceU
#region Arithmetic Operators
+ /// Negate the value.
public static Force operator -(Force right)
{
return new Force(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Force operator +(Force left, Force right)
{
return new Force(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Force operator -(Force left, Force right)
{
return new Force(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Force operator *(double left, Force right)
{
return new Force(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Force operator *(Force left, double right)
{
return new Force(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Force operator /(Force left, double right)
{
return new Force(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Force left, Force right)
{
return left.Newtons / right.Newtons;
@@ -549,36 +556,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceU
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Force left, Force right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Force left, Force right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Force left, Force right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Force left, Force right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Force left, Force right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Force left, Force right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -587,11 +603,14 @@ public int CompareTo(object obj)
return CompareTo(objForce);
}
+ ///
public int CompareTo(Force other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Force objForce))
@@ -600,6 +619,8 @@ public override bool Equals(object obj)
return Equals(objForce);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Force other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -684,6 +705,7 @@ public double As(ForceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ForceUnit) unit);
///
@@ -698,6 +720,7 @@ public Force ToUnit(ForceUnit unit)
IQuantity IQuantity.ToUnit(ForceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ForceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs
index 0649a86a9a..a169dc111d 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Force change rate is the ratio of the force change to the time during which the change occurred (value of force changes per unit time).
///
@@ -113,14 +114,12 @@ public ForceChangeRate(double numericValue, ForceChangeRateUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ForceChangeRateUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -458,6 +457,7 @@ public static ForceChangeRateUnit ParseUnit(string str, IFormatProvider provider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ForceChangeRateUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -482,36 +482,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceC
#region Arithmetic Operators
+ /// Negate the value.
public static ForceChangeRate operator -(ForceChangeRate right)
{
return new ForceChangeRate(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ForceChangeRate operator +(ForceChangeRate left, ForceChangeRate right)
{
return new ForceChangeRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ForceChangeRate operator -(ForceChangeRate left, ForceChangeRate right)
{
return new ForceChangeRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ForceChangeRate operator *(double left, ForceChangeRate right)
{
return new ForceChangeRate(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ForceChangeRate operator *(ForceChangeRate left, double right)
{
return new ForceChangeRate(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ForceChangeRate operator /(ForceChangeRate left, double right)
{
return new ForceChangeRate(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ForceChangeRate left, ForceChangeRate right)
{
return left.NewtonsPerSecond / right.NewtonsPerSecond;
@@ -521,36 +528,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceC
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ForceChangeRate left, ForceChangeRate right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ForceChangeRate left, ForceChangeRate right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ForceChangeRate left, ForceChangeRate right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ForceChangeRate left, ForceChangeRate right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ForceChangeRate left, ForceChangeRate right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ForceChangeRate left, ForceChangeRate right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -559,11 +575,14 @@ public int CompareTo(object obj)
return CompareTo(objForceChangeRate);
}
+ ///
public int CompareTo(ForceChangeRate other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ForceChangeRate objForceChangeRate))
@@ -572,6 +591,8 @@ public override bool Equals(object obj)
return Equals(objForceChangeRate);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ForceChangeRate other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -656,6 +677,7 @@ public double As(ForceChangeRateUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ForceChangeRateUnit) unit);
///
@@ -670,6 +692,7 @@ public ForceChangeRate ToUnit(ForceChangeRateUnit unit)
IQuantity IQuantity.ToUnit(ForceChangeRateUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ForceChangeRateUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs
index 2378516a7d..b989b5c9a2 100644
--- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The magnitude of force per unit length.
///
@@ -113,14 +114,12 @@ public ForcePerLength(double numericValue, ForcePerLengthUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public ForcePerLengthUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -430,6 +429,7 @@ public static ForcePerLengthUnit ParseUnit(string str, IFormatProvider provider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out ForcePerLengthUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -454,36 +454,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceP
#region Arithmetic Operators
+ /// Negate the value.
public static ForcePerLength operator -(ForcePerLength right)
{
return new ForcePerLength(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static ForcePerLength operator +(ForcePerLength left, ForcePerLength right)
{
return new ForcePerLength(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static ForcePerLength operator -(ForcePerLength left, ForcePerLength right)
{
return new ForcePerLength(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static ForcePerLength operator *(double left, ForcePerLength right)
{
return new ForcePerLength(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static ForcePerLength operator *(ForcePerLength left, double right)
{
return new ForcePerLength(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static ForcePerLength operator /(ForcePerLength left, double right)
{
return new ForcePerLength(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(ForcePerLength left, ForcePerLength right)
{
return left.NewtonsPerMeter / right.NewtonsPerMeter;
@@ -493,36 +500,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out ForceP
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(ForcePerLength left, ForcePerLength right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(ForcePerLength left, ForcePerLength right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(ForcePerLength left, ForcePerLength right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(ForcePerLength left, ForcePerLength right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(ForcePerLength left, ForcePerLength right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(ForcePerLength left, ForcePerLength right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -531,11 +547,14 @@ public int CompareTo(object obj)
return CompareTo(objForcePerLength);
}
+ ///
public int CompareTo(ForcePerLength other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is ForcePerLength objForcePerLength))
@@ -544,6 +563,8 @@ public override bool Equals(object obj)
return Equals(objForcePerLength);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(ForcePerLength other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -628,6 +649,7 @@ public double As(ForcePerLengthUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((ForcePerLengthUnit) unit);
///
@@ -642,6 +664,7 @@ public ForcePerLength ToUnit(ForcePerLengthUnit unit)
IQuantity IQuantity.ToUnit(ForcePerLengthUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((ForcePerLengthUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs
index 59f93c0ce3..de8566e23b 100644
--- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The number of occurrences of a repeating event per unit time.
///
@@ -113,14 +114,12 @@ public Frequency(double numericValue, FrequencyUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public FrequencyUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -430,6 +429,7 @@ public static FrequencyUnit ParseUnit(string str, IFormatProvider provider = nul
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out FrequencyUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -454,36 +454,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Freque
#region Arithmetic Operators
+ /// Negate the value.
public static Frequency operator -(Frequency right)
{
return new Frequency(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Frequency operator +(Frequency left, Frequency right)
{
return new Frequency(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Frequency operator -(Frequency left, Frequency right)
{
return new Frequency(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Frequency operator *(double left, Frequency right)
{
return new Frequency(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Frequency operator *(Frequency left, double right)
{
return new Frequency(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Frequency operator /(Frequency left, double right)
{
return new Frequency(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Frequency left, Frequency right)
{
return left.Hertz / right.Hertz;
@@ -493,36 +500,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Freque
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Frequency left, Frequency right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Frequency left, Frequency right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Frequency left, Frequency right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Frequency left, Frequency right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Frequency left, Frequency right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Frequency left, Frequency right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -531,11 +547,14 @@ public int CompareTo(object obj)
return CompareTo(objFrequency);
}
+ ///
public int CompareTo(Frequency other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Frequency objFrequency))
@@ -544,6 +563,8 @@ public override bool Equals(object obj)
return Equals(objFrequency);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Frequency other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -628,6 +649,7 @@ public double As(FrequencyUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((FrequencyUnit) unit);
///
@@ -642,6 +664,7 @@ public Frequency ToUnit(FrequencyUnit unit)
IQuantity IQuantity.ToUnit(FrequencyUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((FrequencyUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs
index 25a9d70073..1761fcd300 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Heat flux is the flow of energy per unit of area per unit of time
///
@@ -113,14 +114,12 @@ public HeatFlux(double numericValue, HeatFluxUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public HeatFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -556,6 +555,7 @@ public static HeatFluxUnit ParseUnit(string str, IFormatProvider provider = null
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out HeatFluxUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -580,36 +580,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatFl
#region Arithmetic Operators
+ /// Negate the value.
public static HeatFlux operator -(HeatFlux right)
{
return new HeatFlux(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static HeatFlux operator +(HeatFlux left, HeatFlux right)
{
return new HeatFlux(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static HeatFlux operator -(HeatFlux left, HeatFlux right)
{
return new HeatFlux(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static HeatFlux operator *(double left, HeatFlux right)
{
return new HeatFlux(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static HeatFlux operator *(HeatFlux left, double right)
{
return new HeatFlux(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static HeatFlux operator /(HeatFlux left, double right)
{
return new HeatFlux(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(HeatFlux left, HeatFlux right)
{
return left.WattsPerSquareMeter / right.WattsPerSquareMeter;
@@ -619,36 +626,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatFl
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(HeatFlux left, HeatFlux right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(HeatFlux left, HeatFlux right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(HeatFlux left, HeatFlux right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(HeatFlux left, HeatFlux right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(HeatFlux left, HeatFlux right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(HeatFlux left, HeatFlux right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -657,11 +673,14 @@ public int CompareTo(object obj)
return CompareTo(objHeatFlux);
}
+ ///
public int CompareTo(HeatFlux other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is HeatFlux objHeatFlux))
@@ -670,6 +689,8 @@ public override bool Equals(object obj)
return Equals(objHeatFlux);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(HeatFlux other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -754,6 +775,7 @@ public double As(HeatFluxUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((HeatFluxUnit) unit);
///
@@ -768,6 +790,7 @@ public HeatFlux ToUnit(HeatFluxUnit unit)
IQuantity IQuantity.ToUnit(HeatFluxUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((HeatFluxUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs
index 7b727f6211..9e44ad4f8e 100644
--- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The heat transfer coefficient or film coefficient, or film effectiveness, in thermodynamics and in mechanics is the proportionality constant between the heat flux and the thermodynamic driving force for the flow of heat (i.e., the temperature difference, ΔT)
///
@@ -113,14 +114,12 @@ public HeatTransferCoefficient(double numericValue, HeatTransferCoefficientUnit
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public HeatTransferCoefficientUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -332,6 +331,7 @@ public static HeatTransferCoefficientUnit ParseUnit(string str, IFormatProvider
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out HeatTransferCoefficientUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -356,36 +356,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatTr
#region Arithmetic Operators
+ /// Negate the value.
public static HeatTransferCoefficient operator -(HeatTransferCoefficient right)
{
return new HeatTransferCoefficient(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static HeatTransferCoefficient operator +(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return new HeatTransferCoefficient(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static HeatTransferCoefficient operator -(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return new HeatTransferCoefficient(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static HeatTransferCoefficient operator *(double left, HeatTransferCoefficient right)
{
return new HeatTransferCoefficient(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static HeatTransferCoefficient operator *(HeatTransferCoefficient left, double right)
{
return new HeatTransferCoefficient(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static HeatTransferCoefficient operator /(HeatTransferCoefficient left, double right)
{
return new HeatTransferCoefficient(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return left.WattsPerSquareMeterKelvin / right.WattsPerSquareMeterKelvin;
@@ -395,36 +402,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out HeatTr
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(HeatTransferCoefficient left, HeatTransferCoefficient right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -433,11 +449,14 @@ public int CompareTo(object obj)
return CompareTo(objHeatTransferCoefficient);
}
+ ///
public int CompareTo(HeatTransferCoefficient other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is HeatTransferCoefficient objHeatTransferCoefficient))
@@ -446,6 +465,8 @@ public override bool Equals(object obj)
return Equals(objHeatTransferCoefficient);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(HeatTransferCoefficient other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -530,6 +551,7 @@ public double As(HeatTransferCoefficientUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((HeatTransferCoefficientUnit) unit);
///
@@ -544,6 +566,7 @@ public HeatTransferCoefficient ToUnit(HeatTransferCoefficientUnit unit)
IQuantity IQuantity.ToUnit(HeatTransferCoefficientUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((HeatTransferCoefficientUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs
index 15b4064264..f055d1bbef 100644
--- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In photometry, illuminance is the total luminous flux incident on a surface, per unit area.
///
@@ -116,14 +117,12 @@ public Illuminance(double numericValue, IlluminanceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public IlluminanceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -363,6 +362,7 @@ public static IlluminanceUnit ParseUnit(string str, IFormatProvider provider = n
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out IlluminanceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -387,36 +387,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Illumi
#region Arithmetic Operators
+ /// Negate the value.
public static Illuminance operator -(Illuminance right)
{
return new Illuminance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Illuminance operator +(Illuminance left, Illuminance right)
{
return new Illuminance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Illuminance operator -(Illuminance left, Illuminance right)
{
return new Illuminance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Illuminance operator *(double left, Illuminance right)
{
return new Illuminance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Illuminance operator *(Illuminance left, double right)
{
return new Illuminance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Illuminance operator /(Illuminance left, double right)
{
return new Illuminance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Illuminance left, Illuminance right)
{
return left.Lux / right.Lux;
@@ -426,36 +433,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Illumi
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Illuminance left, Illuminance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Illuminance left, Illuminance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Illuminance left, Illuminance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Illuminance left, Illuminance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Illuminance left, Illuminance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Illuminance left, Illuminance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -464,11 +480,14 @@ public int CompareTo(object obj)
return CompareTo(objIlluminance);
}
+ ///
public int CompareTo(Illuminance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Illuminance objIlluminance))
@@ -477,6 +496,8 @@ public override bool Equals(object obj)
return Equals(objIlluminance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Illuminance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -561,6 +582,7 @@ public double As(IlluminanceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((IlluminanceUnit) unit);
///
@@ -575,6 +597,7 @@ public Illuminance ToUnit(IlluminanceUnit unit)
IQuantity IQuantity.ToUnit(IlluminanceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((IlluminanceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs
index 72b58736f0..94123fb229 100644
--- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In computing and telecommunications, a unit of information is the capacity of some standard data storage system or communication channel, used to measure the capacities of other systems and channels. In information theory, units of information are also used to measure the information contents or entropy of random variables.
///
@@ -115,14 +116,12 @@ public Information(decimal numericValue, InformationUnit unit)
double IQuantity.Value => (double) _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public InformationUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -670,6 +669,7 @@ public static InformationUnit ParseUnit(string str, IFormatProvider provider = n
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out InformationUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -694,36 +694,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Inform
#region Arithmetic Operators
+ /// Negate the value.
public static Information operator -(Information right)
{
return new Information(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Information operator +(Information left, Information right)
{
return new Information(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Information operator -(Information left, Information right)
{
return new Information(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Information operator *(decimal left, Information right)
{
return new Information(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Information operator *(Information left, decimal right)
{
return new Information(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Information operator /(Information left, decimal right)
{
return new Information(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Information left, Information right)
{
return left.Bits / right.Bits;
@@ -733,36 +740,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Inform
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Information left, Information right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Information left, Information right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Information left, Information right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Information left, Information right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Information left, Information right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Information left, Information right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -771,11 +787,14 @@ public int CompareTo(object obj)
return CompareTo(objInformation);
}
+ ///
public int CompareTo(Information other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Information objInformation))
@@ -784,6 +803,8 @@ public override bool Equals(object obj)
return Equals(objInformation);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Information other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -868,6 +889,7 @@ public double As(InformationUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((InformationUnit) unit);
///
@@ -882,6 +904,7 @@ public Information ToUnit(InformationUnit unit)
IQuantity IQuantity.ToUnit(InformationUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((InformationUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs
index 82e3b46e7d..4407210de9 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Irradiance is the intensity of ultraviolet (UV) or visible light incident on a surface.
///
@@ -113,14 +114,12 @@ public Irradiance(double numericValue, IrradianceUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public IrradianceUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -500,6 +499,7 @@ public static IrradianceUnit ParseUnit(string str, IFormatProvider provider = nu
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out IrradianceUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -524,36 +524,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi
#region Arithmetic Operators
+ /// Negate the value.
public static Irradiance operator -(Irradiance right)
{
return new Irradiance(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Irradiance operator +(Irradiance left, Irradiance right)
{
return new Irradiance(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Irradiance operator -(Irradiance left, Irradiance right)
{
return new Irradiance(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Irradiance operator *(double left, Irradiance right)
{
return new Irradiance(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Irradiance operator *(Irradiance left, double right)
{
return new Irradiance(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Irradiance operator /(Irradiance left, double right)
{
return new Irradiance(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Irradiance left, Irradiance right)
{
return left.WattsPerSquareMeter / right.WattsPerSquareMeter;
@@ -563,36 +570,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Irradiance left, Irradiance right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Irradiance left, Irradiance right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Irradiance left, Irradiance right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Irradiance left, Irradiance right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Irradiance left, Irradiance right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Irradiance left, Irradiance right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -601,11 +617,14 @@ public int CompareTo(object obj)
return CompareTo(objIrradiance);
}
+ ///
public int CompareTo(Irradiance other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Irradiance objIrradiance))
@@ -614,6 +633,8 @@ public override bool Equals(object obj)
return Equals(objIrradiance);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Irradiance other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -698,6 +719,7 @@ public double As(IrradianceUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((IrradianceUnit) unit);
///
@@ -712,6 +734,7 @@ public Irradiance ToUnit(IrradianceUnit unit)
IQuantity IQuantity.ToUnit(IrradianceUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((IrradianceUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs
index c00d58455a..9e47eeaa4f 100644
--- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Irradiation is the process by which an object is exposed to radiation. The exposure can originate from various sources, including natural sources.
///
@@ -116,14 +117,12 @@ public Irradiation(double numericValue, IrradiationUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public IrradiationUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -391,6 +390,7 @@ public static IrradiationUnit ParseUnit(string str, IFormatProvider provider = n
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out IrradiationUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -415,36 +415,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi
#region Arithmetic Operators
+ /// Negate the value.
public static Irradiation operator -(Irradiation right)
{
return new Irradiation(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Irradiation operator +(Irradiation left, Irradiation right)
{
return new Irradiation(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Irradiation operator -(Irradiation left, Irradiation right)
{
return new Irradiation(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Irradiation operator *(double left, Irradiation right)
{
return new Irradiation(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Irradiation operator *(Irradiation left, double right)
{
return new Irradiation(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Irradiation operator /(Irradiation left, double right)
{
return new Irradiation(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Irradiation left, Irradiation right)
{
return left.JoulesPerSquareMeter / right.JoulesPerSquareMeter;
@@ -454,36 +461,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Irradi
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Irradiation left, Irradiation right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Irradiation left, Irradiation right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Irradiation left, Irradiation right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Irradiation left, Irradiation right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Irradiation left, Irradiation right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Irradiation left, Irradiation right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -492,11 +508,14 @@ public int CompareTo(object obj)
return CompareTo(objIrradiation);
}
+ ///
public int CompareTo(Irradiation other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Irradiation objIrradiation))
@@ -505,6 +524,8 @@ public override bool Equals(object obj)
return Equals(objIrradiation);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Irradiation other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -589,6 +610,7 @@ public double As(IrradiationUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((IrradiationUnit) unit);
///
@@ -603,6 +625,7 @@ public Irradiation ToUnit(IrradiationUnit unit)
IQuantity IQuantity.ToUnit(IrradiationUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((IrradiationUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs
index e91ece06ff..9daf25a84c 100644
--- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The viscosity of a fluid is a measure of its resistance to gradual deformation by shear stress or tensile stress.
///
@@ -116,14 +117,12 @@ public KinematicViscosity(double numericValue, KinematicViscosityUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public KinematicViscosityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -419,6 +418,7 @@ public static KinematicViscosityUnit ParseUnit(string str, IFormatProvider provi
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out KinematicViscosityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -443,36 +443,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Kinema
#region Arithmetic Operators
+ /// Negate the value.
public static KinematicViscosity operator -(KinematicViscosity right)
{
return new KinematicViscosity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static KinematicViscosity operator +(KinematicViscosity left, KinematicViscosity right)
{
return new KinematicViscosity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static KinematicViscosity operator -(KinematicViscosity left, KinematicViscosity right)
{
return new KinematicViscosity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static KinematicViscosity operator *(double left, KinematicViscosity right)
{
return new KinematicViscosity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static KinematicViscosity operator *(KinematicViscosity left, double right)
{
return new KinematicViscosity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static KinematicViscosity operator /(KinematicViscosity left, double right)
{
return new KinematicViscosity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(KinematicViscosity left, KinematicViscosity right)
{
return left.SquareMetersPerSecond / right.SquareMetersPerSecond;
@@ -482,36 +489,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Kinema
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(KinematicViscosity left, KinematicViscosity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(KinematicViscosity left, KinematicViscosity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(KinematicViscosity left, KinematicViscosity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(KinematicViscosity left, KinematicViscosity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(KinematicViscosity left, KinematicViscosity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(KinematicViscosity left, KinematicViscosity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -520,11 +536,14 @@ public int CompareTo(object obj)
return CompareTo(objKinematicViscosity);
}
+ ///
public int CompareTo(KinematicViscosity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is KinematicViscosity objKinematicViscosity))
@@ -533,6 +552,8 @@ public override bool Equals(object obj)
return Equals(objKinematicViscosity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(KinematicViscosity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -617,6 +638,7 @@ public double As(KinematicViscosityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((KinematicViscosityUnit) unit);
///
@@ -631,6 +653,7 @@ public KinematicViscosity ToUnit(KinematicViscosityUnit unit)
IQuantity IQuantity.ToUnit(KinematicViscosityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((KinematicViscosityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs
index 12626a9f99..5e23d47d47 100644
--- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Lapse rate is the rate at which Earth's atmospheric temperature decreases with an increase in altitude, or increases with the decrease in altitude.
///
@@ -113,14 +114,12 @@ public LapseRate(double numericValue, LapseRateUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public LapseRateUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -318,6 +317,7 @@ public static LapseRateUnit ParseUnit(string str, IFormatProvider provider = nul
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out LapseRateUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -342,36 +342,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LapseR
#region Arithmetic Operators
+ /// Negate the value.
public static LapseRate operator -(LapseRate right)
{
return new LapseRate(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static LapseRate operator +(LapseRate left, LapseRate right)
{
return new LapseRate(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static LapseRate operator -(LapseRate left, LapseRate right)
{
return new LapseRate(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static LapseRate operator *(double left, LapseRate right)
{
return new LapseRate(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static LapseRate operator *(LapseRate left, double right)
{
return new LapseRate(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static LapseRate operator /(LapseRate left, double right)
{
return new LapseRate(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(LapseRate left, LapseRate right)
{
return left.DegreesCelciusPerKilometer / right.DegreesCelciusPerKilometer;
@@ -381,36 +388,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LapseR
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(LapseRate left, LapseRate right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(LapseRate left, LapseRate right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(LapseRate left, LapseRate right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(LapseRate left, LapseRate right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(LapseRate left, LapseRate right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(LapseRate left, LapseRate right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -419,11 +435,14 @@ public int CompareTo(object obj)
return CompareTo(objLapseRate);
}
+ ///
public int CompareTo(LapseRate other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is LapseRate objLapseRate))
@@ -432,6 +451,8 @@ public override bool Equals(object obj)
return Equals(objLapseRate);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(LapseRate other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -516,6 +537,7 @@ public double As(LapseRateUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((LapseRateUnit) unit);
///
@@ -530,6 +552,7 @@ public LapseRate ToUnit(LapseRateUnit unit)
IQuantity IQuantity.ToUnit(LapseRateUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((LapseRateUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs
index 2d42d80c1e..b36f94125a 100644
--- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Many different units of length have been used around the world. The main units in modern use are U.S. customary units in the United States and the Metric system elsewhere. British Imperial units are still used for some purposes in the United Kingdom and some other countries. The metric system is sub-divided into SI and non-SI units.
///
@@ -113,14 +114,12 @@ public Length(double numericValue, LengthUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public LengthUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -612,6 +611,7 @@ public static LengthUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out LengthUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -636,36 +636,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Length
#region Arithmetic Operators
+ /// Negate the value.
public static Length operator -(Length right)
{
return new Length(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static Length operator +(Length left, Length right)
{
return new Length(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static Length operator -(Length left, Length right)
{
return new Length(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static Length operator *(double left, Length right)
{
return new Length(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static Length operator *(Length left, double right)
{
return new Length(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static Length operator /(Length left, double right)
{
return new Length(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(Length left, Length right)
{
return left.Meters / right.Meters;
@@ -675,36 +682,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Length
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Length left, Length right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Length left, Length right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Length left, Length right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Length left, Length right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Length left, Length right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Length left, Length right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -713,11 +729,14 @@ public int CompareTo(object obj)
return CompareTo(objLength);
}
+ ///
public int CompareTo(Length other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Length objLength))
@@ -726,6 +745,8 @@ public override bool Equals(object obj)
return Equals(objLength);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Length other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -810,6 +831,7 @@ public double As(LengthUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((LengthUnit) unit);
///
@@ -824,6 +846,7 @@ public Length ToUnit(LengthUnit unit)
IQuantity IQuantity.ToUnit(LengthUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((LengthUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs
index b3e927594e..9eb2aa5804 100644
--- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// Level is the logarithm of the ratio of a quantity Q to a reference value of that quantity, Q₀, expressed in dimensionless units.
///
@@ -113,14 +114,12 @@ public Level(double numericValue, LevelUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public LevelUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -332,6 +331,7 @@ public static LevelUnit ParseUnit(string str, IFormatProvider provider = null)
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out LevelUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -356,11 +356,13 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU
#region Logarithmic Arithmetic Operators
+ /// Negate the value.
public static Level operator -(Level right)
{
return new Level(-right.Value, right.Unit);
}
+ /// Get from logarithmic addition of two .
public static Level operator +(Level left, Level right)
{
// Logarithmic addition
@@ -368,6 +370,7 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU
return new Level(10*Math.Log10(Math.Pow(10, left.Value/10) + Math.Pow(10, right.AsBaseNumericType(left.Unit)/10)), left.Unit);
}
+ /// Get from logarithmic subtraction of two .
public static Level operator -(Level left, Level right)
{
// Logarithmic subtraction
@@ -375,24 +378,28 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU
return new Level(10*Math.Log10(Math.Pow(10, left.Value/10) - Math.Pow(10, right.AsBaseNumericType(left.Unit)/10)), left.Unit);
}
+ /// Get from logarithmic multiplication of value and .
public static Level operator *(double left, Level right)
{
// Logarithmic multiplication = addition
return new Level(left + right.Value, right.Unit);
}
+ /// Get from logarithmic multiplication of value and .
public static Level operator *(Level left, double right)
{
// Logarithmic multiplication = addition
return new Level(left.Value + (double)right, left.Unit);
}
+ /// Get from logarithmic division of by value.
public static Level operator /(Level left, double right)
{
// Logarithmic division = subtraction
return new Level(left.Value - (double)right, left.Unit);
}
+ /// Get ratio value from logarithmic division of by .
public static double operator /(Level left, Level right)
{
// Logarithmic division = subtraction
@@ -403,36 +410,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out LevelU
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(Level left, Level right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(Level left, Level right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(Level left, Level right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(Level left, Level right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(Level left, Level right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(Level left, Level right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -441,11 +457,14 @@ public int CompareTo(object obj)
return CompareTo(objLevel);
}
+ ///
public int CompareTo(Level other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is Level objLevel))
@@ -454,6 +473,8 @@ public override bool Equals(object obj)
return Equals(objLevel);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(Level other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -538,6 +559,7 @@ public double As(LevelUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((LevelUnit) unit);
///
@@ -552,6 +574,7 @@ public Level ToUnit(LevelUnit unit)
IQuantity IQuantity.ToUnit(LevelUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((LevelUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs
index 3644425b78..e73251d1bb 100644
--- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// The Linear Density, or more precisely, the linear mass density, of a substance is its mass per unit length. The term linear density is most often used when describing the characteristics of one-dimensional objects, although linear density can also be used to describe the density of a three-dimensional quantity along one particular dimension.
///
@@ -116,14 +117,12 @@ public LinearDensity(double numericValue, LinearDensityUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public LinearDensityUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -349,6 +348,7 @@ public static LinearDensityUnit ParseUnit(string str, IFormatProvider provider =
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out LinearDensityUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -373,36 +373,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Linear
#region Arithmetic Operators
+ /// Negate the value.
public static LinearDensity operator -(LinearDensity right)
{
return new LinearDensity(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static LinearDensity operator +(LinearDensity left, LinearDensity right)
{
return new LinearDensity(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static LinearDensity operator -(LinearDensity left, LinearDensity right)
{
return new LinearDensity(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static LinearDensity operator *(double left, LinearDensity right)
{
return new LinearDensity(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static LinearDensity operator *(LinearDensity left, double right)
{
return new LinearDensity(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static LinearDensity operator /(LinearDensity left, double right)
{
return new LinearDensity(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(LinearDensity left, LinearDensity right)
{
return left.KilogramsPerMeter / right.KilogramsPerMeter;
@@ -412,36 +419,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Linear
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(LinearDensity left, LinearDensity right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(LinearDensity left, LinearDensity right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(LinearDensity left, LinearDensity right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(LinearDensity left, LinearDensity right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(LinearDensity left, LinearDensity right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(LinearDensity left, LinearDensity right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -450,11 +466,14 @@ public int CompareTo(object obj)
return CompareTo(objLinearDensity);
}
+ ///
public int CompareTo(LinearDensity other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is LinearDensity objLinearDensity))
@@ -463,6 +482,8 @@ public override bool Equals(object obj)
return Equals(objLinearDensity);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(LinearDensity other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -547,6 +568,7 @@ public double As(LinearDensityUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((LinearDensityUnit) unit);
///
@@ -561,6 +583,7 @@ public LinearDensity ToUnit(LinearDensityUnit unit)
IQuantity IQuantity.ToUnit(LinearDensityUnit unit) => ToUnit(unit);
+ ///
public IQuantity ToUnit(Enum unit) => ToUnit((LinearDensityUnit) unit);
///
diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs
index b3b9a7b040..f7a476117b 100644
--- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs
+++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs
@@ -28,6 +28,7 @@
namespace UnitsNet
{
+ ///
///
/// In photometry, luminous flux or luminous power is the measure of the perceived power of light.
///
@@ -116,14 +117,12 @@ public LuminousFlux(double numericValue, LuminousFluxUnit unit)
///
public double Value => _value;
- ///
Enum IQuantity.Unit => Unit;
- ///
- /// The unit this quantity was constructed with -or- if default ctor was used.
- ///
+ ///
public LuminousFluxUnit Unit => _unit.GetValueOrDefault(BaseUnit);
+ ///
public QuantityInfo QuantityInfo => Info;
///
@@ -321,6 +320,7 @@ public static LuminousFluxUnit ParseUnit(string str, IFormatProvider provider =
return UnitParser.Default.Parse(str, provider);
}
+ ///
public static bool TryParseUnit(string str, out LuminousFluxUnit unit)
{
return TryParseUnit(str, null, out unit);
@@ -345,36 +345,43 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino
#region Arithmetic Operators
+ /// Negate the value.
public static LuminousFlux operator -(LuminousFlux right)
{
return new LuminousFlux(-right.Value, right.Unit);
}
+ /// Get from adding two .
public static LuminousFlux operator +(LuminousFlux left, LuminousFlux right)
{
return new LuminousFlux(left.Value + right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from subtracting two .
public static LuminousFlux operator -(LuminousFlux left, LuminousFlux right)
{
return new LuminousFlux(left.Value - right.AsBaseNumericType(left.Unit), left.Unit);
}
+ /// Get from multiplying value and .
public static LuminousFlux operator *(double left, LuminousFlux right)
{
return new LuminousFlux(left * right.Value, right.Unit);
}
+ /// Get from multiplying value and .
public static LuminousFlux operator *(LuminousFlux left, double right)
{
return new LuminousFlux(left.Value * right, left.Unit);
}
+ /// Get from dividing by value.
public static LuminousFlux operator /(LuminousFlux left, double right)
{
return new LuminousFlux(left.Value / right, left.Unit);
}
+ /// Get ratio value from dividing by .
public static double operator /(LuminousFlux left, LuminousFlux right)
{
return left.Lumens / right.Lumens;
@@ -384,36 +391,45 @@ public static bool TryParseUnit(string str, IFormatProvider provider, out Lumino
#region Equality / IComparable
+ /// Returns true if less or equal to.
public static bool operator <=(LuminousFlux left, LuminousFlux right)
{
return left.Value <= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than or equal to.
public static bool operator >=(LuminousFlux left, LuminousFlux right)
{
return left.Value >= right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if less than.
public static bool operator <(LuminousFlux left, LuminousFlux right)
{
return left.Value < right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if greater than.
public static bool operator >(LuminousFlux left, LuminousFlux right)
{
return left.Value > right.AsBaseNumericType(left.Unit);
}
+ /// Returns true if exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator ==(LuminousFlux left, LuminousFlux right)
{
return left.Equals(right);
}
+ /// Returns true if not exactly equal.
+ /// Consider using for safely comparing floating point values.
public static bool operator !=(LuminousFlux left, LuminousFlux right)
{
return !(left == right);
}
+ ///
public int CompareTo(object obj)
{
if(obj is null) throw new ArgumentNullException(nameof(obj));
@@ -422,11 +438,14 @@ public int CompareTo(object obj)
return CompareTo(objLuminousFlux);
}
+ ///
public int CompareTo(LuminousFlux other)
{
return _value.CompareTo(other.AsBaseNumericType(this.Unit));
}
+ ///
+ /// Consider using for safely comparing floating point values.
public override bool Equals(object obj)
{
if(obj is null || !(obj is LuminousFlux objLuminousFlux))
@@ -435,6 +454,8 @@ public override bool Equals(object obj)
return Equals(objLuminousFlux);
}
+ ///
+ /// Consider using for safely comparing floating point values.
public bool Equals(LuminousFlux other)
{
return _value.Equals(other.AsBaseNumericType(this.Unit));
@@ -519,6 +540,7 @@ public double As(LuminousFluxUnit unit)
return Convert.ToDouble(converted);
}
+ ///
public double As(Enum unit) => As((LuminousFluxUnit) unit);
///
@@ -533,6 +555,7 @@ public LuminousFlux ToUnit(LuminousFluxUnit unit)
IQuantity IQuantity.ToUnit(LuminousFluxUnit unit) => ToUnit(unit);
+ ///