diff --git a/Common/GeneratedCode/Quantities/Acceleration.Common.g.cs b/Common/GeneratedCode/Quantities/Acceleration.Common.g.cs index c78845e10f..43d882a0cf 100644 --- a/Common/GeneratedCode/Quantities/Acceleration.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Acceleration.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Acceleration : IQuantity -#else - public partial struct Acceleration : IQuantity, IComparable, IComparable -#endif + public partial class Acceleration : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -429,6 +421,9 @@ public int CompareTo(object obj) #endif int CompareTo(Acceleration other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/AmountOfSubstance.Common.g.cs b/Common/GeneratedCode/Quantities/AmountOfSubstance.Common.g.cs index 2ae69c2105..111f222e3a 100644 --- a/Common/GeneratedCode/Quantities/AmountOfSubstance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/AmountOfSubstance.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class AmountOfSubstance : IQuantity -#else - public partial struct AmountOfSubstance : IQuantity, IComparable, IComparable -#endif + public partial class AmountOfSubstance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -448,6 +440,9 @@ public int CompareTo(object obj) #endif int CompareTo(AmountOfSubstance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/AmplitudeRatio.Common.g.cs b/Common/GeneratedCode/Quantities/AmplitudeRatio.Common.g.cs index 21908ddbc5..5737f766c7 100644 --- a/Common/GeneratedCode/Quantities/AmplitudeRatio.Common.g.cs +++ b/Common/GeneratedCode/Quantities/AmplitudeRatio.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The strength of a signal expressed in decibels (dB) relative to one volt RMS. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class AmplitudeRatio : IQuantity -#else - public partial struct AmplitudeRatio : IQuantity, IComparable, IComparable -#endif + public partial class AmplitudeRatio : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -257,6 +249,9 @@ public int CompareTo(object obj) #endif int CompareTo(AmplitudeRatio other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Angle.Common.g.cs b/Common/GeneratedCode/Quantities/Angle.Common.g.cs index 31f12e70d5..156a188a6e 100644 --- a/Common/GeneratedCode/Quantities/Angle.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Angle.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Angle : IQuantity -#else - public partial struct Angle : IQuantity, IComparable, IComparable -#endif + public partial class Angle : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -447,6 +439,9 @@ public int CompareTo(object obj) #endif int CompareTo(Angle other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ApparentEnergy.Common.g.cs b/Common/GeneratedCode/Quantities/ApparentEnergy.Common.g.cs index d3b738c28f..345ce6dfe7 100644 --- a/Common/GeneratedCode/Quantities/ApparentEnergy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ApparentEnergy.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ApparentEnergy : IQuantity -#else - public partial struct ApparentEnergy : IQuantity, IComparable, IComparable -#endif + public partial class ApparentEnergy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(ApparentEnergy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ApparentPower.Common.g.cs b/Common/GeneratedCode/Quantities/ApparentPower.Common.g.cs index 0c92300625..4c65f650c1 100644 --- a/Common/GeneratedCode/Quantities/ApparentPower.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ApparentPower.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ApparentPower : IQuantity -#else - public partial struct ApparentPower : IQuantity, IComparable, IComparable -#endif + public partial class ApparentPower : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -258,6 +250,9 @@ public int CompareTo(object obj) #endif int CompareTo(ApparentPower other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Area.Common.g.cs b/Common/GeneratedCode/Quantities/Area.Common.g.cs index 55d5d0612c..fef7417c49 100644 --- a/Common/GeneratedCode/Quantities/Area.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Area.Common.g.cs @@ -52,15 +52,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). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Area : IQuantity -#else - public partial struct Area : IQuantity, IComparable, IComparable -#endif + public partial class Area : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -429,6 +421,9 @@ public int CompareTo(object obj) #endif int CompareTo(Area other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/AreaDensity.Common.g.cs b/Common/GeneratedCode/Quantities/AreaDensity.Common.g.cs index cb1cfba4d1..a742598b2a 100644 --- a/Common/GeneratedCode/Quantities/AreaDensity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/AreaDensity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The area density of a two-dimensional object is calculated as the mass per unit area. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class AreaDensity : IQuantity -#else - public partial struct AreaDensity : IQuantity, IComparable, IComparable -#endif + public partial class AreaDensity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(AreaDensity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/AreaMomentOfInertia.Common.g.cs b/Common/GeneratedCode/Quantities/AreaMomentOfInertia.Common.g.cs index 0c8c11b930..9af628e159 100644 --- a/Common/GeneratedCode/Quantities/AreaMomentOfInertia.Common.g.cs +++ b/Common/GeneratedCode/Quantities/AreaMomentOfInertia.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// A geometric property of an area that reflects how its points are distributed with regard to an axis. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class AreaMomentOfInertia : IQuantity -#else - public partial struct AreaMomentOfInertia : IQuantity, IComparable, IComparable -#endif + public partial class AreaMomentOfInertia : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -296,6 +288,9 @@ public int CompareTo(object obj) #endif int CompareTo(AreaMomentOfInertia other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/BitRate.Common.g.cs b/Common/GeneratedCode/Quantities/BitRate.Common.g.cs index c80cb9103d..f309d52eec 100644 --- a/Common/GeneratedCode/Quantities/BitRate.Common.g.cs +++ b/Common/GeneratedCode/Quantities/BitRate.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class BitRate : IQuantity -#else - public partial struct BitRate : IQuantity, IComparable, IComparable -#endif + public partial class BitRate : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -675,6 +667,9 @@ public int CompareTo(object obj) #endif int CompareTo(BitRate other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.Common.g.cs b/Common/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.Common.g.cs index 8451783471..9046ed59b6 100644 --- a/Common/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.Common.g.cs +++ b/Common/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class BrakeSpecificFuelConsumption : IQuantity -#else - public partial struct BrakeSpecificFuelConsumption : IQuantity, IComparable, IComparable -#endif + public partial class BrakeSpecificFuelConsumption : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(BrakeSpecificFuelConsumption other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Capacitance.Common.g.cs b/Common/GeneratedCode/Quantities/Capacitance.Common.g.cs index 207d620ce3..36698a09a6 100644 --- a/Common/GeneratedCode/Quantities/Capacitance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Capacitance.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Capacitance is the ability of a body to store an electric charge. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Capacitance : IQuantity -#else - public partial struct Capacitance : IQuantity, IComparable, IComparable -#endif + public partial class Capacitance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(Capacitance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Density.Common.g.cs b/Common/GeneratedCode/Quantities/Density.Common.g.cs index 424502289b..977853ac68 100644 --- a/Common/GeneratedCode/Quantities/Density.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Density.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The density, or more precisely, the volumetric mass density, of a substance is its mass per unit volume. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Density : IQuantity -#else - public partial struct Density : IQuantity, IComparable, IComparable -#endif + public partial class Density : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -904,6 +896,9 @@ public int CompareTo(object obj) #endif int CompareTo(Density other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Duration.Common.g.cs b/Common/GeneratedCode/Quantities/Duration.Common.g.cs index fb65aefdf7..9687f7dc2e 100644 --- a/Common/GeneratedCode/Quantities/Duration.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Duration.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Duration : IQuantity -#else - public partial struct Duration : IQuantity, IComparable, IComparable -#endif + public partial class Duration : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -372,6 +364,9 @@ public int CompareTo(object obj) #endif int CompareTo(Duration other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/DynamicViscosity.Common.g.cs b/Common/GeneratedCode/Quantities/DynamicViscosity.Common.g.cs index 019b542850..fd2ebda970 100644 --- a/Common/GeneratedCode/Quantities/DynamicViscosity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/DynamicViscosity.Common.g.cs @@ -52,15 +52,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 /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class DynamicViscosity : IQuantity -#else - public partial struct DynamicViscosity : IQuantity, IComparable, IComparable -#endif + public partial class DynamicViscosity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -296,6 +288,9 @@ public int CompareTo(object obj) #endif int CompareTo(DynamicViscosity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricAdmittance.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricAdmittance.Common.g.cs index d80d3e16b4..cc4019e35d 100644 --- a/Common/GeneratedCode/Quantities/ElectricAdmittance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricAdmittance.Common.g.cs @@ -52,15 +52,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). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricAdmittance : IQuantity -#else - public partial struct ElectricAdmittance : IQuantity, IComparable, IComparable -#endif + public partial class ElectricAdmittance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -258,6 +250,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricAdmittance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricCharge.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricCharge.Common.g.cs index 1c871dbf10..5fbc21e860 100644 --- a/Common/GeneratedCode/Quantities/ElectricCharge.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricCharge.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Electric charge is the physical property of matter that causes it to experience a force when placed in an electromagnetic field. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricCharge : IQuantity -#else - public partial struct ElectricCharge : IQuantity, IComparable, IComparable -#endif + public partial class ElectricCharge : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricCharge other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricChargeDensity.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricChargeDensity.Common.g.cs index 0c96f85a45..85d501c980 100644 --- a/Common/GeneratedCode/Quantities/ElectricChargeDensity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricChargeDensity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In electromagnetism, charge density is a measure of the amount of electric charge per unit length, surface area, or volume. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricChargeDensity : IQuantity -#else - public partial struct ElectricChargeDensity : IQuantity, IComparable, IComparable -#endif + public partial class ElectricChargeDensity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricChargeDensity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricConductance.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricConductance.Common.g.cs index faf9943273..66282287d4 100644 --- a/Common/GeneratedCode/Quantities/ElectricConductance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricConductance.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The electrical conductance of an electrical conductor is a measure of the easeness to pass an electric current through that conductor. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricConductance : IQuantity -#else - public partial struct ElectricConductance : IQuantity, IComparable, IComparable -#endif + public partial class ElectricConductance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricConductance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricConductivity.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricConductivity.Common.g.cs index b7eecdd660..f338d254e2 100644 --- a/Common/GeneratedCode/Quantities/ElectricConductivity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricConductivity.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricConductivity : IQuantity -#else - public partial struct ElectricConductivity : IQuantity, IComparable, IComparable -#endif + public partial class ElectricConductivity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricConductivity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricCurrent.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricCurrent.Common.g.cs index c89040b50b..8aef2345c6 100644 --- a/Common/GeneratedCode/Quantities/ElectricCurrent.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricCurrent.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricCurrent : IQuantity -#else - public partial struct ElectricCurrent : IQuantity, IComparable, IComparable -#endif + public partial class ElectricCurrent : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -334,6 +326,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricCurrent other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricCurrentDensity.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricCurrentDensity.Common.g.cs index 07dc957242..3e763fb093 100644 --- a/Common/GeneratedCode/Quantities/ElectricCurrentDensity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricCurrentDensity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In electromagnetism, current density is the electric current per unit area of cross section. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricCurrentDensity : IQuantity -#else - public partial struct ElectricCurrentDensity : IQuantity, IComparable, IComparable -#endif + public partial class ElectricCurrentDensity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricCurrentDensity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricCurrentGradient.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricCurrentGradient.Common.g.cs index 98ba0877fa..bb6b12b960 100644 --- a/Common/GeneratedCode/Quantities/ElectricCurrentGradient.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricCurrentGradient.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In electromagnetism, the current gradient describes how the current changes in time. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricCurrentGradient : IQuantity -#else - public partial struct ElectricCurrentGradient : IQuantity, IComparable, IComparable -#endif + public partial class ElectricCurrentGradient : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricCurrentGradient other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricField.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricField.Common.g.cs index c7f4415c0d..3fb6ae682a 100644 --- a/Common/GeneratedCode/Quantities/ElectricField.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricField.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// An electric field is a force field that surrounds electric charges that attracts or repels other electric charges. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricField : IQuantity -#else - public partial struct ElectricField : IQuantity, IComparable, IComparable -#endif + public partial class ElectricField : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricField other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricInductance.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricInductance.Common.g.cs index 5e99aca8fc..c54bfd679e 100644 --- a/Common/GeneratedCode/Quantities/ElectricInductance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricInductance.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Inductance is a property of an electrical conductor which opposes a change in current. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricInductance : IQuantity -#else - public partial struct ElectricInductance : IQuantity, IComparable, IComparable -#endif + public partial class ElectricInductance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricInductance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricPotential.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricPotential.Common.g.cs index 1335fe4f02..4595315dc3 100644 --- a/Common/GeneratedCode/Quantities/ElectricPotential.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricPotential.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricPotential : IQuantity -#else - public partial struct ElectricPotential : IQuantity, IComparable, IComparable -#endif + public partial class ElectricPotential : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -277,6 +269,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricPotential other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricPotentialAc.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricPotentialAc.Common.g.cs index ede77df0b7..2c5b902d26 100644 --- a/Common/GeneratedCode/Quantities/ElectricPotentialAc.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricPotentialAc.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The Electric Potential of a system known to use Alternating Current. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricPotentialAc : IQuantity -#else - public partial struct ElectricPotentialAc : IQuantity, IComparable, IComparable -#endif + public partial class ElectricPotentialAc : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -276,6 +268,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricPotentialAc other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricPotentialDc.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricPotentialDc.Common.g.cs index 646534343f..5bfe3dcc45 100644 --- a/Common/GeneratedCode/Quantities/ElectricPotentialDc.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricPotentialDc.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The Electric Potential of a system known to use Direct Current. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricPotentialDc : IQuantity -#else - public partial struct ElectricPotentialDc : IQuantity, IComparable, IComparable -#endif + public partial class ElectricPotentialDc : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -276,6 +268,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricPotentialDc other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricResistance.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricResistance.Common.g.cs index edfbe3cf3c..f69bfd4221 100644 --- a/Common/GeneratedCode/Quantities/ElectricResistance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricResistance.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The electrical resistance of an electrical conductor is the opposition to the passage of an electric current through that conductor. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricResistance : IQuantity -#else - public partial struct ElectricResistance : IQuantity, IComparable, IComparable -#endif + public partial class ElectricResistance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -258,6 +250,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricResistance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ElectricResistivity.Common.g.cs b/Common/GeneratedCode/Quantities/ElectricResistivity.Common.g.cs index 1bf2b97e84..fa13890813 100644 --- a/Common/GeneratedCode/Quantities/ElectricResistivity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ElectricResistivity.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ElectricResistivity : IQuantity -#else - public partial struct ElectricResistivity : IQuantity, IComparable, IComparable -#endif + public partial class ElectricResistivity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -258,6 +250,9 @@ public int CompareTo(object obj) #endif int CompareTo(ElectricResistivity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Energy.Common.g.cs b/Common/GeneratedCode/Quantities/Energy.Common.g.cs index 300d8ebd52..7407464059 100644 --- a/Common/GeneratedCode/Quantities/Energy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Energy.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Energy : IQuantity -#else - public partial struct Energy : IQuantity, IComparable, IComparable -#endif + public partial class Energy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -600,6 +592,9 @@ public int CompareTo(object obj) #endif int CompareTo(Energy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Entropy.Common.g.cs b/Common/GeneratedCode/Quantities/Entropy.Common.g.cs index 58134e394d..3238a93e4b 100644 --- a/Common/GeneratedCode/Quantities/Entropy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Entropy.Common.g.cs @@ -52,15 +52,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 /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Entropy : IQuantity -#else - public partial struct Entropy : IQuantity, IComparable, IComparable -#endif + public partial class Entropy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -315,6 +307,9 @@ public int CompareTo(object obj) #endif int CompareTo(Entropy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Force.Common.g.cs b/Common/GeneratedCode/Quantities/Force.Common.g.cs index 423da91f80..3070640025 100644 --- a/Common/GeneratedCode/Quantities/Force.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Force.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Force : IQuantity -#else - public partial struct Force : IQuantity, IComparable, IComparable -#endif + public partial class Force : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -372,6 +364,9 @@ public int CompareTo(object obj) #endif int CompareTo(Force other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ForceChangeRate.Common.g.cs b/Common/GeneratedCode/Quantities/ForceChangeRate.Common.g.cs index 8d40ac8eed..07b051ab42 100644 --- a/Common/GeneratedCode/Quantities/ForceChangeRate.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ForceChangeRate.Common.g.cs @@ -52,15 +52,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). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ForceChangeRate : IQuantity -#else - public partial struct ForceChangeRate : IQuantity, IComparable, IComparable -#endif + public partial class ForceChangeRate : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -391,6 +383,9 @@ public int CompareTo(object obj) #endif int CompareTo(ForceChangeRate other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ForcePerLength.Common.g.cs b/Common/GeneratedCode/Quantities/ForcePerLength.Common.g.cs index b125ddab77..01b476da44 100644 --- a/Common/GeneratedCode/Quantities/ForcePerLength.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ForcePerLength.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The magnitude of force per unit length. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ForcePerLength : IQuantity -#else - public partial struct ForcePerLength : IQuantity, IComparable, IComparable -#endif + public partial class ForcePerLength : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -353,6 +345,9 @@ public int CompareTo(object obj) #endif int CompareTo(ForcePerLength other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Frequency.Common.g.cs b/Common/GeneratedCode/Quantities/Frequency.Common.g.cs index ad20b1e708..c295a8bc5f 100644 --- a/Common/GeneratedCode/Quantities/Frequency.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Frequency.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The number of occurrences of a repeating event per unit time. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Frequency : IQuantity -#else - public partial struct Frequency : IQuantity, IComparable, IComparable -#endif + public partial class Frequency : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -334,6 +326,9 @@ public int CompareTo(object obj) #endif int CompareTo(Frequency other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/HeatFlux.Common.g.cs b/Common/GeneratedCode/Quantities/HeatFlux.Common.g.cs index 3924581ad1..f6f3269ec4 100644 --- a/Common/GeneratedCode/Quantities/HeatFlux.Common.g.cs +++ b/Common/GeneratedCode/Quantities/HeatFlux.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Heat flux is the flow of energy per unit of area per unit of time /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class HeatFlux : IQuantity -#else - public partial struct HeatFlux : IQuantity, IComparable, IComparable -#endif + public partial class HeatFlux : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -486,6 +478,9 @@ public int CompareTo(object obj) #endif int CompareTo(HeatFlux other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/HeatTransferCoefficient.Common.g.cs b/Common/GeneratedCode/Quantities/HeatTransferCoefficient.Common.g.cs index 0af5b86e65..58f3838eea 100644 --- a/Common/GeneratedCode/Quantities/HeatTransferCoefficient.Common.g.cs +++ b/Common/GeneratedCode/Quantities/HeatTransferCoefficient.Common.g.cs @@ -52,15 +52,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) /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class HeatTransferCoefficient : IQuantity -#else - public partial struct HeatTransferCoefficient : IQuantity, IComparable, IComparable -#endif + public partial class HeatTransferCoefficient : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -220,6 +212,9 @@ public int CompareTo(object obj) #endif int CompareTo(HeatTransferCoefficient other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Illuminance.Common.g.cs b/Common/GeneratedCode/Quantities/Illuminance.Common.g.cs index fa620ee0f1..5c2ae5629a 100644 --- a/Common/GeneratedCode/Quantities/Illuminance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Illuminance.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In photometry, illuminance is the total luminous flux incident on a surface, per unit area. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Illuminance : IQuantity -#else - public partial struct Illuminance : IQuantity, IComparable, IComparable -#endif + public partial class Illuminance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -258,6 +250,9 @@ public int CompareTo(object obj) #endif int CompareTo(Illuminance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Information.Common.g.cs b/Common/GeneratedCode/Quantities/Information.Common.g.cs index f970685a84..ce418e7106 100644 --- a/Common/GeneratedCode/Quantities/Information.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Information.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Information : IQuantity -#else - public partial struct Information : IQuantity, IComparable, IComparable -#endif + public partial class Information : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -675,6 +667,9 @@ public int CompareTo(object obj) #endif int CompareTo(Information other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Irradiance.Common.g.cs b/Common/GeneratedCode/Quantities/Irradiance.Common.g.cs index e88be7e7e5..94eb70eb49 100644 --- a/Common/GeneratedCode/Quantities/Irradiance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Irradiance.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Irradiance is the intensity of ultraviolet (UV) or visible light incident on a surface. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Irradiance : IQuantity -#else - public partial struct Irradiance : IQuantity, IComparable, IComparable -#endif + public partial class Irradiance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -220,6 +212,9 @@ public int CompareTo(object obj) #endif int CompareTo(Irradiance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Irradiation.Common.g.cs b/Common/GeneratedCode/Quantities/Irradiation.Common.g.cs index 185c9dc106..8be6732b56 100644 --- a/Common/GeneratedCode/Quantities/Irradiation.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Irradiation.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Irradiation : IQuantity -#else - public partial struct Irradiation : IQuantity, IComparable, IComparable -#endif + public partial class Irradiation : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(Irradiation other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/KinematicViscosity.Common.g.cs b/Common/GeneratedCode/Quantities/KinematicViscosity.Common.g.cs index 31ab830023..106418de7e 100644 --- a/Common/GeneratedCode/Quantities/KinematicViscosity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/KinematicViscosity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The viscosity of a fluid is a measure of its resistance to gradual deformation by shear stress or tensile stress. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class KinematicViscosity : IQuantity -#else - public partial struct KinematicViscosity : IQuantity, IComparable, IComparable -#endif + public partial class KinematicViscosity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -334,6 +326,9 @@ public int CompareTo(object obj) #endif int CompareTo(KinematicViscosity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/LapseRate.Common.g.cs b/Common/GeneratedCode/Quantities/LapseRate.Common.g.cs index f151d87f4b..c8f4feb11a 100644 --- a/Common/GeneratedCode/Quantities/LapseRate.Common.g.cs +++ b/Common/GeneratedCode/Quantities/LapseRate.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class LapseRate : IQuantity -#else - public partial struct LapseRate : IQuantity, IComparable, IComparable -#endif + public partial class LapseRate : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(LapseRate other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Length.Common.g.cs b/Common/GeneratedCode/Quantities/Length.Common.g.cs index df3c766803..1cc1855384 100644 --- a/Common/GeneratedCode/Quantities/Length.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Length.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Length : IQuantity -#else - public partial struct Length : IQuantity, IComparable, IComparable -#endif + public partial class Length : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -600,6 +592,9 @@ public int CompareTo(object obj) #endif int CompareTo(Length other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Level.Common.g.cs b/Common/GeneratedCode/Quantities/Level.Common.g.cs index 135559cb2b..f6ab0f210c 100644 --- a/Common/GeneratedCode/Quantities/Level.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Level.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Level : IQuantity -#else - public partial struct Level : IQuantity, IComparable, IComparable -#endif + public partial class Level : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -219,6 +211,9 @@ public int CompareTo(object obj) #endif int CompareTo(Level other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/LinearDensity.Common.g.cs b/Common/GeneratedCode/Quantities/LinearDensity.Common.g.cs index ed61cef9dc..cabf6ec83d 100644 --- a/Common/GeneratedCode/Quantities/LinearDensity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/LinearDensity.Common.g.cs @@ -52,15 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class LinearDensity : IQuantity -#else - public partial struct LinearDensity : IQuantity, IComparable, IComparable -#endif + public partial class LinearDensity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(LinearDensity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/LuminousFlux.Common.g.cs b/Common/GeneratedCode/Quantities/LuminousFlux.Common.g.cs index bbe14681e8..b558373c9b 100644 --- a/Common/GeneratedCode/Quantities/LuminousFlux.Common.g.cs +++ b/Common/GeneratedCode/Quantities/LuminousFlux.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In photometry, luminous flux or luminous power is the measure of the perceived power of light. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class LuminousFlux : IQuantity -#else - public partial struct LuminousFlux : IQuantity, IComparable, IComparable -#endif + public partial class LuminousFlux : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(LuminousFlux other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/LuminousIntensity.Common.g.cs b/Common/GeneratedCode/Quantities/LuminousIntensity.Common.g.cs index 105d0ab1b6..02ff2ed09e 100644 --- a/Common/GeneratedCode/Quantities/LuminousIntensity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/LuminousIntensity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In photometry, luminous intensity is a measure of the wavelength-weighted power emitted by a light source in a particular direction per unit solid angle, based on the luminosity function, a standardized model of the sensitivity of the human eye. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class LuminousIntensity : IQuantity -#else - public partial struct LuminousIntensity : IQuantity, IComparable, IComparable -#endif + public partial class LuminousIntensity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(LuminousIntensity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MagneticField.Common.g.cs b/Common/GeneratedCode/Quantities/MagneticField.Common.g.cs index 777010fce3..ed46dca87d 100644 --- a/Common/GeneratedCode/Quantities/MagneticField.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MagneticField.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// A magnetic field is a force field that is created by moving electric charges (electric currents) and magnetic dipoles, and exerts a force on other nearby moving charges and magnetic dipoles. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MagneticField : IQuantity -#else - public partial struct MagneticField : IQuantity, IComparable, IComparable -#endif + public partial class MagneticField : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(MagneticField other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MagneticFlux.Common.g.cs b/Common/GeneratedCode/Quantities/MagneticFlux.Common.g.cs index eab4ccba84..30d1aa8914 100644 --- a/Common/GeneratedCode/Quantities/MagneticFlux.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MagneticFlux.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In physics, specifically electromagnetism, the magnetic flux through a surface is the surface integral of the normal component of the magnetic field B passing through that surface. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MagneticFlux : IQuantity -#else - public partial struct MagneticFlux : IQuantity, IComparable, IComparable -#endif + public partial class MagneticFlux : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(MagneticFlux other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Magnetization.Common.g.cs b/Common/GeneratedCode/Quantities/Magnetization.Common.g.cs index 3fe35ea7f5..4d0ec02305 100644 --- a/Common/GeneratedCode/Quantities/Magnetization.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Magnetization.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In classical electromagnetism, magnetization is the vector field that expresses the density of permanent or induced magnetic dipole moments in a magnetic material. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Magnetization : IQuantity -#else - public partial struct Magnetization : IQuantity, IComparable, IComparable -#endif + public partial class Magnetization : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(Magnetization other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Mass.Common.g.cs b/Common/GeneratedCode/Quantities/Mass.Common.g.cs index 9aeaac81ef..2c9e2e6bf6 100644 --- a/Common/GeneratedCode/Quantities/Mass.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Mass.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In physics, mass (from Greek μᾶζα "barley cake, lump [of dough]") is a property of a physical system or body, giving rise to the phenomena of the body's resistance to being accelerated by a force and the strength of its mutual gravitational attraction with other bodies. Instruments such as mass balances or scales use those phenomena to measure mass. The SI unit of mass is the kilogram (kg). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Mass : IQuantity -#else - public partial struct Mass : IQuantity, IComparable, IComparable -#endif + public partial class Mass : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -581,6 +573,9 @@ public int CompareTo(object obj) #endif int CompareTo(Mass other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MassFlow.Common.g.cs b/Common/GeneratedCode/Quantities/MassFlow.Common.g.cs index 4920b42077..fffd895001 100644 --- a/Common/GeneratedCode/Quantities/MassFlow.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MassFlow.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Mass flow is the ratio of the mass change to the time during which the change occurred (value of mass changes per unit time). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MassFlow : IQuantity -#else - public partial struct MassFlow : IQuantity, IComparable, IComparable -#endif + public partial class MassFlow : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -467,6 +459,9 @@ public int CompareTo(object obj) #endif int CompareTo(MassFlow other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MassFlux.Common.g.cs b/Common/GeneratedCode/Quantities/MassFlux.Common.g.cs index b7eaf6eeff..7af6e39ec6 100644 --- a/Common/GeneratedCode/Quantities/MassFlux.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MassFlux.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Mass flux is the mass flow rate per unit area. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MassFlux : IQuantity -#else - public partial struct MassFlux : IQuantity, IComparable, IComparable -#endif + public partial class MassFlux : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -220,6 +212,9 @@ public int CompareTo(object obj) #endif int CompareTo(MassFlux other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MassMomentOfInertia.Common.g.cs b/Common/GeneratedCode/Quantities/MassMomentOfInertia.Common.g.cs index 6dd62ed4b8..13201d5209 100644 --- a/Common/GeneratedCode/Quantities/MassMomentOfInertia.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MassMomentOfInertia.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// A property of body reflects how its mass is distributed with regard to an axis. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MassMomentOfInertia : IQuantity -#else - public partial struct MassMomentOfInertia : IQuantity, IComparable, IComparable -#endif + public partial class MassMomentOfInertia : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -676,6 +668,9 @@ public int CompareTo(object obj) #endif int CompareTo(MassMomentOfInertia other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MolarEnergy.Common.g.cs b/Common/GeneratedCode/Quantities/MolarEnergy.Common.g.cs index 7d9bdf58b3..93595c5950 100644 --- a/Common/GeneratedCode/Quantities/MolarEnergy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MolarEnergy.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Molar energy is the amount of energy stored in 1 mole of a substance. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MolarEnergy : IQuantity -#else - public partial struct MolarEnergy : IQuantity, IComparable, IComparable -#endif + public partial class MolarEnergy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(MolarEnergy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MolarEntropy.Common.g.cs b/Common/GeneratedCode/Quantities/MolarEntropy.Common.g.cs index a198221bc0..964efc0b7c 100644 --- a/Common/GeneratedCode/Quantities/MolarEntropy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MolarEntropy.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Molar entropy is amount of energy required to increase temperature of 1 mole substance by 1 Kelvin. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MolarEntropy : IQuantity -#else - public partial struct MolarEntropy : IQuantity, IComparable, IComparable -#endif + public partial class MolarEntropy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(MolarEntropy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/MolarMass.Common.g.cs b/Common/GeneratedCode/Quantities/MolarMass.Common.g.cs index caaf577f31..209dbf6eb6 100644 --- a/Common/GeneratedCode/Quantities/MolarMass.Common.g.cs +++ b/Common/GeneratedCode/Quantities/MolarMass.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In chemistry, the molar mass M is a physical property defined as the mass of a given substance (chemical element or chemical compound) divided by the amount of substance. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class MolarMass : IQuantity -#else - public partial struct MolarMass : IQuantity, IComparable, IComparable -#endif + public partial class MolarMass : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -410,6 +402,9 @@ public int CompareTo(object obj) #endif int CompareTo(MolarMass other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Molarity.Common.g.cs b/Common/GeneratedCode/Quantities/Molarity.Common.g.cs index 5a11b934cf..26cbdcefb9 100644 --- a/Common/GeneratedCode/Quantities/Molarity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Molarity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Molar concentration, also called molarity, amount concentration or substance concentration, is a measure of the concentration of a solute in a solution, or of any chemical species, in terms of amount of substance in a given volume. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Molarity : IQuantity -#else - public partial struct Molarity : IQuantity, IComparable, IComparable -#endif + public partial class Molarity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -334,6 +326,9 @@ public int CompareTo(object obj) #endif int CompareTo(Molarity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Permeability.Common.g.cs b/Common/GeneratedCode/Quantities/Permeability.Common.g.cs index 605d01f70f..dbede8853c 100644 --- a/Common/GeneratedCode/Quantities/Permeability.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Permeability.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In electromagnetism, permeability is the measure of the ability of a material to support the formation of a magnetic field within itself. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Permeability : IQuantity -#else - public partial struct Permeability : IQuantity, IComparable, IComparable -#endif + public partial class Permeability : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(Permeability other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Permittivity.Common.g.cs b/Common/GeneratedCode/Quantities/Permittivity.Common.g.cs index 5e478eebca..bae340dee1 100644 --- a/Common/GeneratedCode/Quantities/Permittivity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Permittivity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In electromagnetism, permittivity is the measure of resistance that is encountered when forming an electric field in a particular medium. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Permittivity : IQuantity -#else - public partial struct Permittivity : IQuantity, IComparable, IComparable -#endif + public partial class Permittivity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -201,6 +193,9 @@ public int CompareTo(object obj) #endif int CompareTo(Permittivity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Power.Common.g.cs b/Common/GeneratedCode/Quantities/Power.Common.g.cs index ba59d32489..30f2f67a4a 100644 --- a/Common/GeneratedCode/Quantities/Power.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Power.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In physics, power is the rate of doing work. It is equivalent to an amount of energy consumed per unit time. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Power : IQuantity -#else - public partial struct Power : IQuantity, IComparable, IComparable -#endif + public partial class Power : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -562,6 +554,9 @@ public int CompareTo(object obj) #endif int CompareTo(Power other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/PowerDensity.Common.g.cs b/Common/GeneratedCode/Quantities/PowerDensity.Common.g.cs index 8d8ab2583b..3a4abbe943 100644 --- a/Common/GeneratedCode/Quantities/PowerDensity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/PowerDensity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The amount of power in a volume. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class PowerDensity : IQuantity -#else - public partial struct PowerDensity : IQuantity, IComparable, IComparable -#endif + public partial class PowerDensity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -1018,6 +1010,9 @@ public int CompareTo(object obj) #endif int CompareTo(PowerDensity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/PowerRatio.Common.g.cs b/Common/GeneratedCode/Quantities/PowerRatio.Common.g.cs index 76a694a796..3adabbc82f 100644 --- a/Common/GeneratedCode/Quantities/PowerRatio.Common.g.cs +++ b/Common/GeneratedCode/Quantities/PowerRatio.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The strength of a signal expressed in decibels (dB) relative to one watt. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class PowerRatio : IQuantity -#else - public partial struct PowerRatio : IQuantity, IComparable, IComparable -#endif + public partial class PowerRatio : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -219,6 +211,9 @@ public int CompareTo(object obj) #endif int CompareTo(PowerRatio other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Pressure.Common.g.cs b/Common/GeneratedCode/Quantities/Pressure.Common.g.cs index ec02f2f093..ed5aa638b6 100644 --- a/Common/GeneratedCode/Quantities/Pressure.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Pressure.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Pressure (symbol: P or p) is the ratio of force to the area over which that force is distributed. Pressure is force per unit area applied in a direction perpendicular to the surface of an object. Gauge pressure (also spelled gage pressure)[a] is the pressure relative to the local atmospheric or ambient pressure. Pressure is measured in any unit of force divided by any unit of area. The SI unit of pressure is the newton per square metre, which is called the pascal (Pa) after the seventeenth-century philosopher and scientist Blaise Pascal. A pressure of 1 Pa is small; it approximately equals the pressure exerted by a dollar bill resting flat on a table. Everyday pressures are often stated in kilopascals (1 kPa = 1000 Pa). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Pressure : IQuantity -#else - public partial struct Pressure : IQuantity, IComparable, IComparable -#endif + public partial class Pressure : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -885,6 +877,9 @@ public int CompareTo(object obj) #endif int CompareTo(Pressure other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/PressureChangeRate.Common.g.cs b/Common/GeneratedCode/Quantities/PressureChangeRate.Common.g.cs index 5eb9d4e36f..37226b5ff7 100644 --- a/Common/GeneratedCode/Quantities/PressureChangeRate.Common.g.cs +++ b/Common/GeneratedCode/Quantities/PressureChangeRate.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Pressure change rate is the ratio of the pressure change to the time during which the change occurred (value of pressure changes per unit time). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class PressureChangeRate : IQuantity -#else - public partial struct PressureChangeRate : IQuantity, IComparable, IComparable -#endif + public partial class PressureChangeRate : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -258,6 +250,9 @@ public int CompareTo(object obj) #endif int CompareTo(PressureChangeRate other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Ratio.Common.g.cs b/Common/GeneratedCode/Quantities/Ratio.Common.g.cs index 9a9ed80adf..a90ad829cc 100644 --- a/Common/GeneratedCode/Quantities/Ratio.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Ratio.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In mathematics, a ratio is a relationship between two numbers of the same kind (e.g., objects, persons, students, spoonfuls, units of whatever identical dimension), usually expressed as "a to b" or a:b, sometimes expressed arithmetically as a dimensionless quotient of the two that explicitly indicates how many times the first number contains the second (not necessarily an integer). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Ratio : IQuantity -#else - public partial struct Ratio : IQuantity, IComparable, IComparable -#endif + public partial class Ratio : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -295,6 +287,9 @@ public int CompareTo(object obj) #endif int CompareTo(Ratio other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ReactiveEnergy.Common.g.cs b/Common/GeneratedCode/Quantities/ReactiveEnergy.Common.g.cs index f0c04d4347..e515ef8b22 100644 --- a/Common/GeneratedCode/Quantities/ReactiveEnergy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ReactiveEnergy.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The Volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ReactiveEnergy : IQuantity -#else - public partial struct ReactiveEnergy : IQuantity, IComparable, IComparable -#endif + public partial class ReactiveEnergy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(ReactiveEnergy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ReactivePower.Common.g.cs b/Common/GeneratedCode/Quantities/ReactivePower.Common.g.cs index 58efa1c60c..7181a54dca 100644 --- a/Common/GeneratedCode/Quantities/ReactivePower.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ReactivePower.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Volt-ampere reactive (var) is a unit by which reactive power is expressed in an AC electric power system. Reactive power exists in an AC circuit when the current and voltage are not in phase. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ReactivePower : IQuantity -#else - public partial struct ReactivePower : IQuantity, IComparable, IComparable -#endif + public partial class ReactivePower : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -258,6 +250,9 @@ public int CompareTo(object obj) #endif int CompareTo(ReactivePower other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/RotationalAcceleration.Common.g.cs b/Common/GeneratedCode/Quantities/RotationalAcceleration.Common.g.cs index 62db2b62c3..463bdb35bc 100644 --- a/Common/GeneratedCode/Quantities/RotationalAcceleration.Common.g.cs +++ b/Common/GeneratedCode/Quantities/RotationalAcceleration.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Angular acceleration is the rate of change of rotational speed. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class RotationalAcceleration : IQuantity -#else - public partial struct RotationalAcceleration : IQuantity, IComparable, IComparable -#endif + public partial class RotationalAcceleration : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(RotationalAcceleration other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/RotationalSpeed.Common.g.cs b/Common/GeneratedCode/Quantities/RotationalSpeed.Common.g.cs index 62a31f62bf..2b65864f48 100644 --- a/Common/GeneratedCode/Quantities/RotationalSpeed.Common.g.cs +++ b/Common/GeneratedCode/Quantities/RotationalSpeed.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Rotational speed (sometimes called speed of revolution) is the number of complete rotations, revolutions, cycles, or turns per time unit. Rotational speed is a cyclic frequency, measured in radians per second or in hertz in the SI System by scientists, or in revolutions per minute (rpm or min-1) or revolutions per second in everyday life. The symbol for rotational speed is ω (the Greek lowercase letter "omega"). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class RotationalSpeed : IQuantity -#else - public partial struct RotationalSpeed : IQuantity, IComparable, IComparable -#endif + public partial class RotationalSpeed : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -429,6 +421,9 @@ public int CompareTo(object obj) #endif int CompareTo(RotationalSpeed other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/RotationalStiffness.Common.g.cs b/Common/GeneratedCode/Quantities/RotationalStiffness.Common.g.cs index 6b9bff2b71..c51e97f45a 100644 --- a/Common/GeneratedCode/Quantities/RotationalStiffness.Common.g.cs +++ b/Common/GeneratedCode/Quantities/RotationalStiffness.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// https://en.wikipedia.org/wiki/Stiffness#Rotational_stiffness /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class RotationalStiffness : IQuantity -#else - public partial struct RotationalStiffness : IQuantity, IComparable, IComparable -#endif + public partial class RotationalStiffness : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(RotationalStiffness other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/RotationalStiffnessPerLength.Common.g.cs b/Common/GeneratedCode/Quantities/RotationalStiffnessPerLength.Common.g.cs index 67cbb7fb44..7b932ad6c2 100644 --- a/Common/GeneratedCode/Quantities/RotationalStiffnessPerLength.Common.g.cs +++ b/Common/GeneratedCode/Quantities/RotationalStiffnessPerLength.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// https://en.wikipedia.org/wiki/Stiffness#Rotational_stiffness /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class RotationalStiffnessPerLength : IQuantity -#else - public partial struct RotationalStiffnessPerLength : IQuantity, IComparable, IComparable -#endif + public partial class RotationalStiffnessPerLength : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -239,6 +231,9 @@ public int CompareTo(object obj) #endif int CompareTo(RotationalStiffnessPerLength other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/SolidAngle.Common.g.cs b/Common/GeneratedCode/Quantities/SolidAngle.Common.g.cs index ecdbbb4195..5526b2c446 100644 --- a/Common/GeneratedCode/Quantities/SolidAngle.Common.g.cs +++ b/Common/GeneratedCode/Quantities/SolidAngle.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In geometry, a solid angle is the two-dimensional angle in three-dimensional space that an object subtends at a point. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class SolidAngle : IQuantity -#else - public partial struct SolidAngle : IQuantity, IComparable, IComparable -#endif + public partial class SolidAngle : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -200,6 +192,9 @@ public int CompareTo(object obj) #endif int CompareTo(SolidAngle other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/SpecificEnergy.Common.g.cs b/Common/GeneratedCode/Quantities/SpecificEnergy.Common.g.cs index 6ec937c74f..61e4dc0d34 100644 --- a/Common/GeneratedCode/Quantities/SpecificEnergy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/SpecificEnergy.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The SpecificEnergy /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class SpecificEnergy : IQuantity -#else - public partial struct SpecificEnergy : IQuantity, IComparable, IComparable -#endif + public partial class SpecificEnergy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -334,6 +326,9 @@ public int CompareTo(object obj) #endif int CompareTo(SpecificEnergy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/SpecificEntropy.Common.g.cs b/Common/GeneratedCode/Quantities/SpecificEntropy.Common.g.cs index 3842b05971..79eb1e5b0d 100644 --- a/Common/GeneratedCode/Quantities/SpecificEntropy.Common.g.cs +++ b/Common/GeneratedCode/Quantities/SpecificEntropy.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Specific entropy is an amount of energy required to raise temperature of a substance by 1 Kelvin per unit mass. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class SpecificEntropy : IQuantity -#else - public partial struct SpecificEntropy : IQuantity, IComparable, IComparable -#endif + public partial class SpecificEntropy : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -334,6 +326,9 @@ public int CompareTo(object obj) #endif int CompareTo(SpecificEntropy other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/SpecificVolume.Common.g.cs b/Common/GeneratedCode/Quantities/SpecificVolume.Common.g.cs index 2f1280f0aa..3dd5e6adb1 100644 --- a/Common/GeneratedCode/Quantities/SpecificVolume.Common.g.cs +++ b/Common/GeneratedCode/Quantities/SpecificVolume.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In thermodynamics, the specific volume of a substance is the ratio of the substance's volume to its mass. It is the reciprocal of density and an intrinsic property of matter as well. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class SpecificVolume : IQuantity -#else - public partial struct SpecificVolume : IQuantity, IComparable, IComparable -#endif + public partial class SpecificVolume : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -220,6 +212,9 @@ public int CompareTo(object obj) #endif int CompareTo(SpecificVolume other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/SpecificWeight.Common.g.cs b/Common/GeneratedCode/Quantities/SpecificWeight.Common.g.cs index 339c20529d..8339028703 100644 --- a/Common/GeneratedCode/Quantities/SpecificWeight.Common.g.cs +++ b/Common/GeneratedCode/Quantities/SpecificWeight.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// The SpecificWeight, or more precisely, the volumetric weight density, of a substance is its weight per unit volume. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class SpecificWeight : IQuantity -#else - public partial struct SpecificWeight : IQuantity, IComparable, IComparable -#endif + public partial class SpecificWeight : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -505,6 +497,9 @@ public int CompareTo(object obj) #endif int CompareTo(SpecificWeight other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Speed.Common.g.cs b/Common/GeneratedCode/Quantities/Speed.Common.g.cs index 1910b3ae57..acf6921612 100644 --- a/Common/GeneratedCode/Quantities/Speed.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Speed.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In everyday use and in kinematics, the speed of an object is the magnitude of its velocity (the rate of change of its position); it is thus a scalar quantity.[1] The average speed of an object in an interval of time is the distance travelled by the object divided by the duration of the interval;[2] the instantaneous speed is the limit of the average speed as the duration of the time interval approaches zero. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Speed : IQuantity -#else - public partial struct Speed : IQuantity, IComparable, IComparable -#endif + public partial class Speed : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -790,6 +782,9 @@ public int CompareTo(object obj) #endif int CompareTo(Speed other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Temperature.Common.g.cs b/Common/GeneratedCode/Quantities/Temperature.Common.g.cs index 2ee2dd11d2..77eb15b290 100644 --- a/Common/GeneratedCode/Quantities/Temperature.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Temperature.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// A temperature is a numerical measure of hot or cold. Its measurement is by detection of heat radiation or particle velocity or kinetic energy, or by the bulk behavior of a thermometric material. It may be calibrated in any of various temperature scales, Celsius, Fahrenheit, Kelvin, etc. The fundamental physical definition of temperature is provided by thermodynamics. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Temperature : IQuantity -#else - public partial struct Temperature : IQuantity, IComparable, IComparable -#endif + public partial class Temperature : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -334,6 +326,9 @@ public int CompareTo(object obj) #endif int CompareTo(Temperature other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/TemperatureChangeRate.Common.g.cs b/Common/GeneratedCode/Quantities/TemperatureChangeRate.Common.g.cs index 3fafb7743b..dd80f63eaa 100644 --- a/Common/GeneratedCode/Quantities/TemperatureChangeRate.Common.g.cs +++ b/Common/GeneratedCode/Quantities/TemperatureChangeRate.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Temperature change rate is the ratio of the temperature change to the time during which the change occurred (value of temperature changes per unit time). /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class TemperatureChangeRate : IQuantity -#else - public partial struct TemperatureChangeRate : IQuantity, IComparable, IComparable -#endif + public partial class TemperatureChangeRate : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -372,6 +364,9 @@ public int CompareTo(object obj) #endif int CompareTo(TemperatureChangeRate other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/TemperatureDelta.Common.g.cs b/Common/GeneratedCode/Quantities/TemperatureDelta.Common.g.cs index 8728ee1613..d7d2a73ca3 100644 --- a/Common/GeneratedCode/Quantities/TemperatureDelta.Common.g.cs +++ b/Common/GeneratedCode/Quantities/TemperatureDelta.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Difference between two temperatures. The conversions are different than for Temperature. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class TemperatureDelta : IQuantity -#else - public partial struct TemperatureDelta : IQuantity, IComparable, IComparable -#endif + public partial class TemperatureDelta : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -333,6 +325,9 @@ public int CompareTo(object obj) #endif int CompareTo(TemperatureDelta other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ThermalConductivity.Common.g.cs b/Common/GeneratedCode/Quantities/ThermalConductivity.Common.g.cs index e433887e49..3a8493bf17 100644 --- a/Common/GeneratedCode/Quantities/ThermalConductivity.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ThermalConductivity.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Thermal conductivity is the property of a material to conduct heat. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ThermalConductivity : IQuantity -#else - public partial struct ThermalConductivity : IQuantity, IComparable, IComparable -#endif + public partial class ThermalConductivity : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -220,6 +212,9 @@ public int CompareTo(object obj) #endif int CompareTo(ThermalConductivity other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/ThermalResistance.Common.g.cs b/Common/GeneratedCode/Quantities/ThermalResistance.Common.g.cs index 9652cb4f1d..5a1b4bd3d0 100644 --- a/Common/GeneratedCode/Quantities/ThermalResistance.Common.g.cs +++ b/Common/GeneratedCode/Quantities/ThermalResistance.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Heat Transfer Coefficient or Thermal conductivity - indicates a materials ability to conduct heat. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class ThermalResistance : IQuantity -#else - public partial struct ThermalResistance : IQuantity, IComparable, IComparable -#endif + public partial class ThermalResistance : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -277,6 +269,9 @@ public int CompareTo(object obj) #endif int CompareTo(ThermalResistance other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Torque.Common.g.cs b/Common/GeneratedCode/Quantities/Torque.Common.g.cs index d0187fa896..5c844429ef 100644 --- a/Common/GeneratedCode/Quantities/Torque.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Torque.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Torque, moment or moment of force (see the terminology below), is the tendency of a force to rotate an object about an axis,[1] fulcrum, or pivot. Just as a force is a push or a pull, a torque can be thought of as a twist to an object. Mathematically, torque is defined as the cross product of the lever-arm distance and force, which tends to produce rotation. Loosely speaking, torque is a measure of the turning force on an object such as a bolt or a flywheel. For example, pushing or pulling the handle of a wrench connected to a nut or bolt produces a torque (turning force) that loosens or tightens the nut or bolt. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Torque : IQuantity -#else - public partial struct Torque : IQuantity, IComparable, IComparable -#endif + public partial class Torque : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -581,6 +573,9 @@ public int CompareTo(object obj) #endif int CompareTo(Torque other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/VitaminA.Common.g.cs b/Common/GeneratedCode/Quantities/VitaminA.Common.g.cs index 43a11b2394..558142c31c 100644 --- a/Common/GeneratedCode/Quantities/VitaminA.Common.g.cs +++ b/Common/GeneratedCode/Quantities/VitaminA.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Vitamin A: 1 IU is the biological equivalent of 0.3 µg retinol, or of 0.6 µg beta-carotene. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class VitaminA : IQuantity -#else - public partial struct VitaminA : IQuantity, IComparable, IComparable -#endif + public partial class VitaminA : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -200,6 +192,9 @@ public int CompareTo(object obj) #endif int CompareTo(VitaminA other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/Volume.Common.g.cs b/Common/GeneratedCode/Quantities/Volume.Common.g.cs index f4b37e14a4..88af5359c8 100644 --- a/Common/GeneratedCode/Quantities/Volume.Common.g.cs +++ b/Common/GeneratedCode/Quantities/Volume.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// Volume is the quantity of three-dimensional space enclosed by some closed boundary, for example, the space that a substance (solid, liquid, gas, or plasma) or shape occupies or contains.[1] Volume is often quantified numerically using the SI derived unit, the cubic metre. The volume of a container is generally understood to be the capacity of the container, i. e. the amount of fluid (gas or liquid) that the container could hold, rather than the amount of space the container itself displaces. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class Volume : IQuantity -#else - public partial struct Volume : IQuantity, IComparable, IComparable -#endif + public partial class Volume : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -980,6 +972,9 @@ public int CompareTo(object obj) #endif int CompareTo(Volume other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/Common/GeneratedCode/Quantities/VolumeFlow.Common.g.cs b/Common/GeneratedCode/Quantities/VolumeFlow.Common.g.cs index 6d1309ae28..f6e23b26a8 100644 --- a/Common/GeneratedCode/Quantities/VolumeFlow.Common.g.cs +++ b/Common/GeneratedCode/Quantities/VolumeFlow.Common.g.cs @@ -52,15 +52,7 @@ namespace UnitsNet /// In physics and engineering, in particular fluid dynamics and hydrometry, the volumetric flow rate, (also known as volume flow rate, rate of fluid flow or volume velocity) is the volume of fluid which passes through a given surface per unit time. The SI unit is m³/s (cubic meters per second). In US Customary Units and British Imperial Units, volumetric flow rate is often expressed as ft³/s (cubic feet per second). It is usually represented by the symbol Q. /// // ReSharper disable once PartialTypeWithSinglePart - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class VolumeFlow : IQuantity -#else - public partial struct VolumeFlow : IQuantity, IComparable, IComparable -#endif + public partial class VolumeFlow : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -676,6 +668,9 @@ public int CompareTo(object obj) #endif int CompareTo(VolumeFlow other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/UnitsNet.Serialization.JsonNet.Tests/UnitsNetJsonConverterTests.cs b/UnitsNet.Serialization.JsonNet.Tests/UnitsNetJsonConverterTests.cs index 4514d5be1d..81a485057d 100644 --- a/UnitsNet.Serialization.JsonNet.Tests/UnitsNetJsonConverterTests.cs +++ b/UnitsNet.Serialization.JsonNet.Tests/UnitsNetJsonConverterTests.cs @@ -80,44 +80,6 @@ public void Information_ExpectConstructedValueAndUnit() Assert.Equal(expectedJson, json); } - [Fact] - public void NonNullNullableValue_ExpectJsonUnaffected() - { - Mass? nullableMass = Mass.FromKilograms(10); - var expectedJson = "{\n \"Unit\": \"MassUnit.Kilogram\",\n \"Value\": 10.0\n}"; - - string json = SerializeObject(nullableMass); - - // There shouldn't be any change in the JSON for the non-null nullable value. - Assert.Equal(expectedJson, json); - } - - [Fact] - public void NonNullNullableValueNestedInObject_ExpectJsonUnaffected() - { - var testObj = new TestObj - { - NullableFrequency = Frequency.FromHertz(10), - NonNullableFrequency = Frequency.FromHertz(10) - }; - // Ugly manually formatted JSON string is used because string literals with newlines are rendered differently - // on the build server (i.e. the build server uses '\r' instead of '\n') - string expectedJson = "{\n" + - " \"NullableFrequency\": {\n" + - " \"Unit\": \"FrequencyUnit.Hertz\",\n" + - " \"Value\": 10.0\n" + - " },\n" + - " \"NonNullableFrequency\": {\n" + - " \"Unit\": \"FrequencyUnit.Hertz\",\n" + - " \"Value\": 10.0\n" + - " }\n" + - "}"; - - string json = SerializeObject(testObj); - - Assert.Equal(expectedJson, json); - } - [Fact] public void NullValue_ExpectJsonContainsNullString() { @@ -160,56 +122,6 @@ public void Mass_ExpectJsonCorrectlyDeserialized() Assert.Equal(originalMass, deserializedMass); } - [Fact] - public void NonNullNullableValue_ExpectValueDeserializedCorrectly() - { - Mass? nullableMass = Mass.FromKilograms(10); - string json = SerializeObject(nullableMass); - - Mass? deserializedNullableMass = DeserializeObject(json); - - Assert.Equal(nullableMass.Value, deserializedNullableMass); - } - - [Fact] - public void NonNullNullableValueNestedInObject_ExpectValueDeserializedCorrectly() - { - var testObj = new TestObj - { - NullableFrequency = Frequency.FromHertz(10), - NonNullableFrequency = Frequency.FromHertz(10) - }; - string json = SerializeObject(testObj); - - var deserializedTestObj = DeserializeObject(json); - - Assert.Equal(testObj.NullableFrequency, deserializedTestObj.NullableFrequency); - } - - [Fact] - public void NullValue_ExpectNullReturned() - { - string json = SerializeObject(null); - var deserializedNullMass = DeserializeObject(json); - - Assert.Null(deserializedNullMass); - } - - [Fact] - public void NullValueNestedInObject_ExpectValueDeserializedToNullCorrectly() - { - var testObj = new TestObj - { - NullableFrequency = null, - NonNullableFrequency = Frequency.FromHertz(10) - }; - string json = SerializeObject(testObj); - - var deserializedTestObj = DeserializeObject(json); - - Assert.Null(deserializedTestObj.NullableFrequency); - } - [Fact] public void UnitEnumChangedAfterSerialization_ExpectUnitCorrectlyDeserialized() { @@ -328,12 +240,6 @@ private static JsonSerializerSettings CreateJsonSerializerSettings() } } - private class TestObj - { - public Frequency? NullableFrequency { get; set; } - public Frequency NonNullableFrequency { get; set; } - } - private class TestObjWithValueAndUnit : IComparable { public double Value { get; set; } diff --git a/UnitsNet.Tests/QuantityTests.Ctor.cs b/UnitsNet.Tests/QuantityTests.Ctor.cs index 29892d21e4..7ee28d3a0c 100644 --- a/UnitsNet.Tests/QuantityTests.Ctor.cs +++ b/UnitsNet.Tests/QuantityTests.Ctor.cs @@ -13,54 +13,6 @@ public partial class QuantityTests /// public class Ctor { - [Fact] - [SuppressMessage("ReSharper", "ObjectCreationAsStatement", Justification = "Only testing the ctor itself, not the resulting value.")] - public void DefaultCtorOfRepresentativeTypes_DoesNotThrow() - { - // double types - new Length(); - - // decimal types - new Information(); - - // logarithmic types - new Level(); - } - - [Fact] - public void DefaultCtorOfRepresentativeTypes_SetsValueToZeroAndUnitToBaseUnit() - { - // double types - Assert.Equal(0, new Mass().Value); - Assert.Equal(MassUnit.Kilogram, new Mass().Unit); - - // decimal types - Assert.Equal(0, new Information().Value); - Assert.Equal(InformationUnit.Bit, new Information().Unit); - - // logarithmic types - Assert.Equal(0, new Level().Value); - Assert.Equal(LevelUnit.Decibel, new Level().Unit); - } - - /// - /// This test is a bit misplaced, but was added because when working on #389 unit+value there were two - /// ways to implement this; either assume BaseUnit of unit is not specified or throw if quantity did not have unit explicitly set. - /// Struct types do not allow custom default ctor implementations, so that exception would then be thrown when trying to convert. - /// - [Fact] - public void DefaultCtorOfRepresentativeTypes_DoesNotThrowWhenConvertingToOtherUnits() - { - // double types - Assert.Equal(0, new Mass().Hectograms); - - // decimal types - Assert.Equal(0, new Information().Kibibits); - - // logarithmic types - Assert.Equal(0, new Level().Nepers); - } - [Fact] public void CtorWithOnlyValueOfRepresentativeTypes_SetsValueToGivenValueAndUnitToBaseUnit() { diff --git a/UnitsNet.Tests/QuantityTests.ToString.cs b/UnitsNet.Tests/QuantityTests.ToString.cs index d0cad78e31..fb112419c3 100644 --- a/UnitsNet.Tests/QuantityTests.ToString.cs +++ b/UnitsNet.Tests/QuantityTests.ToString.cs @@ -30,19 +30,6 @@ public partial class QuantityTests { public class ToStringTests { - [Fact] - public void CreatedByDefaultCtor_ReturnsValueInBaseUnit() - { - // double types - Assert.Equal("0 kg", new Mass().ToString()); - - // decimal types - Assert.Equal("0 b", new Information().ToString()); - - // logarithmic types - Assert.Equal("0 dB", new Level().ToString()); - } - [Fact] public void CreatedByCtorWithValue_ReturnsValueInBaseUnit() { diff --git a/UnitsNet/CustomCode/Quantities/Acceleration.extra.cs b/UnitsNet/CustomCode/Quantities/Acceleration.extra.cs index 1e89b9b6ea..2a173ff13d 100644 --- a/UnitsNet/CustomCode/Quantities/Acceleration.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Acceleration.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Acceleration #else - public partial struct Acceleration + public partial class Acceleration #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/AmplitudeRatio.extra.cs b/UnitsNet/CustomCode/Quantities/AmplitudeRatio.extra.cs index 5933fbbf48..8602f9c640 100644 --- a/UnitsNet/CustomCode/Quantities/AmplitudeRatio.extra.cs +++ b/UnitsNet/CustomCode/Quantities/AmplitudeRatio.extra.cs @@ -31,7 +31,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class AmplitudeRatio #else - public partial struct AmplitudeRatio + public partial class AmplitudeRatio #endif { /// @@ -49,7 +49,6 @@ public partial struct AmplitudeRatio public #endif AmplitudeRatio(ElectricPotential voltage) - : this() { if (voltage.Volts <= 0) throw new ArgumentOutOfRangeException( diff --git a/UnitsNet/CustomCode/Quantities/Angle.extra.cs b/UnitsNet/CustomCode/Quantities/Angle.extra.cs index fdcd60cbcb..e9366a8290 100644 --- a/UnitsNet/CustomCode/Quantities/Angle.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Angle.extra.cs @@ -33,7 +33,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Angle #else - public partial struct Angle + public partial class Angle #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Area.extra.cs b/UnitsNet/CustomCode/Quantities/Area.extra.cs index 1b7c5c5de4..a9e6326791 100644 --- a/UnitsNet/CustomCode/Quantities/Area.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Area.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Area #else - public partial struct Area + public partial class Area #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs b/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs index 2a9e9a437e..6f29e781ca 100644 --- a/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs +++ b/UnitsNet/CustomCode/Quantities/BrakeSpecificFuelConsumption.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class BrakeSpecificFuelConsumption #else - public partial struct BrakeSpecificFuelConsumption + public partial class BrakeSpecificFuelConsumption #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Density.extra.cs b/UnitsNet/CustomCode/Quantities/Density.extra.cs index d82336f64c..041f60c7fd 100644 --- a/UnitsNet/CustomCode/Quantities/Density.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Density.extra.cs @@ -30,7 +30,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Density #else - public partial struct Density + public partial class Density #endif { /// diff --git a/UnitsNet/CustomCode/Quantities/Duration.extra.cs b/UnitsNet/CustomCode/Quantities/Duration.extra.cs index dd0c691cdf..aa6d1ee5c6 100644 --- a/UnitsNet/CustomCode/Quantities/Duration.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Duration.extra.cs @@ -30,7 +30,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Duration #else - public partial struct Duration + public partial class Duration #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs b/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs index 33286fd870..86a3d1c65c 100644 --- a/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs +++ b/UnitsNet/CustomCode/Quantities/DynamicViscosity.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class DynamicViscosity #else - public partial struct DynamicViscosity + public partial class DynamicViscosity #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Force.extra.cs b/UnitsNet/CustomCode/Quantities/Force.extra.cs index 925f36002d..ca571886fb 100644 --- a/UnitsNet/CustomCode/Quantities/Force.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Force.extra.cs @@ -30,7 +30,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Force #else - public partial struct Force + public partial class Force #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs b/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs index 86d9642e54..614b5d1bac 100644 --- a/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs +++ b/UnitsNet/CustomCode/Quantities/ForcePerLength.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class ForcePerLength #else - public partial struct ForcePerLength + public partial class ForcePerLength #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs b/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs index 2e8910ba43..8eec77ca1b 100644 --- a/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs +++ b/UnitsNet/CustomCode/Quantities/HeatFlux.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class HeatFlux #else - public partial struct HeatFlux + public partial class HeatFlux #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs b/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs index bc637de97e..bed1776086 100644 --- a/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs +++ b/UnitsNet/CustomCode/Quantities/KinematicViscosity.extra.cs @@ -33,7 +33,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class KinematicViscosity #else - public partial struct KinematicViscosity + public partial class KinematicViscosity #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs b/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs index ba34a2e828..fa26baf58a 100644 --- a/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs +++ b/UnitsNet/CustomCode/Quantities/LapseRate.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class LapseRate #else - public partial struct LapseRate + public partial class LapseRate #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs index 8ba55134c1..ed886dd872 100644 --- a/UnitsNet/CustomCode/Quantities/Length.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs @@ -38,7 +38,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Length #else - public partial struct Length + public partial class Length #endif { private const double FeetToInches = 12; diff --git a/UnitsNet/CustomCode/Quantities/Level.extra.cs b/UnitsNet/CustomCode/Quantities/Level.extra.cs index b222bbcaf6..6377aad39d 100644 --- a/UnitsNet/CustomCode/Quantities/Level.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Level.extra.cs @@ -30,7 +30,7 @@ namespace UnitsNet // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. // Cannot have methods with same name and same number of parameters. #if !WINDOWS_UWP - public partial struct Level + public partial class Level { /// /// Initializes a new instance of the logarithmic struct which is the ratio of a quantity Q to a @@ -39,7 +39,6 @@ public partial struct Level /// The quantity. /// The reference value that is compared to. public Level(double quantity, double reference) - : this() { string errorMessage = $"The base-10 logarithm of a number ≤ 0 is undefined ({quantity}/{reference})."; diff --git a/UnitsNet/CustomCode/Quantities/Mass.extra.cs b/UnitsNet/CustomCode/Quantities/Mass.extra.cs index d3bcb95044..1e50a95198 100644 --- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs @@ -38,7 +38,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Mass #else - public partial struct Mass + public partial class Mass #endif { public static Mass FromGravitationalForce(Force f) diff --git a/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs b/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs index 9bbdac03b3..ce84ff55df 100644 --- a/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs +++ b/UnitsNet/CustomCode/Quantities/MassFlow.extra.cs @@ -33,7 +33,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class MassFlow #else - public partial struct MassFlow + public partial class MassFlow #endif { #if !WINDOWS_UWP diff --git a/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs b/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs index 31062c283c..a7649aac56 100644 --- a/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs +++ b/UnitsNet/CustomCode/Quantities/MassFlux.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class MassFlux #else - public partial struct MassFlux + public partial class MassFlux #endif { #if !WINDOWS_UWP diff --git a/UnitsNet/CustomCode/Quantities/Molarity.extra.cs b/UnitsNet/CustomCode/Quantities/Molarity.extra.cs index a34a1a026d..015799f4cb 100644 --- a/UnitsNet/CustomCode/Quantities/Molarity.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Molarity.extra.cs @@ -9,7 +9,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Molarity #else - public partial struct Molarity + public partial class Molarity #endif { // Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods @@ -19,7 +19,6 @@ public partial struct Molarity public #endif Molarity(Density density, Mass molecularWeight) - : this() { _value = density.KilogramsPerCubicMeter / molecularWeight.Kilograms; _unit = MolarityUnit.MolesPerCubicMeter; diff --git a/UnitsNet/CustomCode/Quantities/Power.extra.cs b/UnitsNet/CustomCode/Quantities/Power.extra.cs index 5db0ad8aa1..e95095bc42 100644 --- a/UnitsNet/CustomCode/Quantities/Power.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Power.extra.cs @@ -33,7 +33,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Power #else - public partial struct Power + public partial class Power #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/PowerRatio.extra.cs b/UnitsNet/CustomCode/Quantities/PowerRatio.extra.cs index a0b00e0d9a..7c3942bbfe 100644 --- a/UnitsNet/CustomCode/Quantities/PowerRatio.extra.cs +++ b/UnitsNet/CustomCode/Quantities/PowerRatio.extra.cs @@ -31,7 +31,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class PowerRatio #else - public partial struct PowerRatio + public partial class PowerRatio #endif { /// @@ -46,7 +46,6 @@ public partial struct PowerRatio public #endif PowerRatio(Power power) - : this() { if (power.Watts <= 0) throw new ArgumentOutOfRangeException( diff --git a/UnitsNet/CustomCode/Quantities/Pressure.extra.cs b/UnitsNet/CustomCode/Quantities/Pressure.extra.cs index e85acc8212..4235f2cc5d 100644 --- a/UnitsNet/CustomCode/Quantities/Pressure.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Pressure.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Pressure #else - public partial struct Pressure + public partial class Pressure #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs b/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs index 5282a13ee0..5f7e9972ad 100644 --- a/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs +++ b/UnitsNet/CustomCode/Quantities/RotationalSpeed.extra.cs @@ -33,7 +33,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class RotationalSpeed #else - public partial struct RotationalSpeed + public partial class RotationalSpeed #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs b/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs index 300276c10e..8b44cad686 100644 --- a/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs +++ b/UnitsNet/CustomCode/Quantities/RotationalStiffness.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class RotationalStiffness #else - public partial struct RotationalStiffness + public partial class RotationalStiffness #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs b/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs index b4028483ed..a2715342dc 100644 --- a/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs +++ b/UnitsNet/CustomCode/Quantities/RotationalStiffnessPerLength.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class RotationalStiffnessPerLength #else - public partial struct RotationalStiffnessPerLength + public partial class RotationalStiffnessPerLength #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs b/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs index a17a8a4fd4..b48060d9a3 100644 --- a/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs +++ b/UnitsNet/CustomCode/Quantities/SpecificEnergy.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class SpecificEnergy #else - public partial struct SpecificEnergy + public partial class SpecificEnergy #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs b/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs index 3df2036e99..c5eed4dc52 100644 --- a/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs +++ b/UnitsNet/CustomCode/Quantities/SpecificVolume.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class SpecificVolume #else - public partial struct SpecificVolume + public partial class SpecificVolume #endif { diff --git a/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs b/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs index b9403d2107..882808f5ca 100644 --- a/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs +++ b/UnitsNet/CustomCode/Quantities/SpecificWeight.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class SpecificWeight #else - public partial struct SpecificWeight + public partial class SpecificWeight #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Speed.extra.cs b/UnitsNet/CustomCode/Quantities/Speed.extra.cs index f27bd4d765..6a24026553 100644 --- a/UnitsNet/CustomCode/Quantities/Speed.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Speed.extra.cs @@ -33,7 +33,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Speed #else - public partial struct Speed + public partial class Speed #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Temperature.extra.cs b/UnitsNet/CustomCode/Quantities/Temperature.extra.cs index fed00fd718..bb988f4f15 100644 --- a/UnitsNet/CustomCode/Quantities/Temperature.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Temperature.extra.cs @@ -30,7 +30,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Temperature #else - public partial struct Temperature + public partial class Temperature #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs b/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs index 4ec7201483..964ec03221 100644 --- a/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs +++ b/UnitsNet/CustomCode/Quantities/TemperatureDelta.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class TemperatureDelta #else - public partial struct TemperatureDelta + public partial class TemperatureDelta #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Torque.extra.cs b/UnitsNet/CustomCode/Quantities/Torque.extra.cs index ded64d2ec5..d7805c5f03 100644 --- a/UnitsNet/CustomCode/Quantities/Torque.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Torque.extra.cs @@ -28,7 +28,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Torque #else - public partial struct Torque + public partial class Torque #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/Volume.extra.cs b/UnitsNet/CustomCode/Quantities/Volume.extra.cs index 8792faf783..e0b648a3fa 100644 --- a/UnitsNet/CustomCode/Quantities/Volume.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Volume.extra.cs @@ -30,7 +30,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class Volume #else - public partial struct Volume + public partial class Volume #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs b/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs index 2d31a4785e..36badfddb3 100644 --- a/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs +++ b/UnitsNet/CustomCode/Quantities/VolumeFlow.extra.cs @@ -30,7 +30,7 @@ namespace UnitsNet #if WINDOWS_UWP public sealed partial class VolumeFlow #else - public partial struct VolumeFlow + public partial class VolumeFlow #endif { // Windows Runtime Component does not allow operator overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs index 0e89ea1a12..d7418a92b2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Acceleration : IComparable, IComparable + public partial class Acceleration : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs index 86d4278cd0..db91adfc44 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct AmountOfSubstance : IComparable, IComparable + public partial class AmountOfSubstance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs index e0fa81cd5d..18db78b09d 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The strength of a signal expressed in decibels (dB) relative to one volt RMS. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct AmplitudeRatio : IComparable, IComparable + public partial class AmplitudeRatio : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs index 51753db5d2..a2aba01d2d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Angle : IComparable, IComparable + public partial class Angle : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs index 41bfe2d46f..ad421446a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ApparentEnergy : IComparable, IComparable + public partial class ApparentEnergy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs index 992613a95a..3a1af0771c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ApparentPower : IComparable, IComparable + public partial class ApparentPower : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs index a4bfa9e295..6b4da44eec 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.NetFramework.g.cs @@ -52,8 +52,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). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Area : IComparable, IComparable + public partial class Area : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs index 6b09e42eac..5b2ffc358e 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The area density of a two-dimensional object is calculated as the mass per unit area. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct AreaDensity : IComparable, IComparable + public partial class AreaDensity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs index d036010068..26c861e3af 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// A geometric property of an area that reflects how its points are distributed with regard to an axis. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct AreaMomentOfInertia : IComparable, IComparable + public partial class AreaMomentOfInertia : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs index cff763ba49..75a46e0793 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct BitRate : IComparable, IComparable + public partial class BitRate : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs index 37117d872c..5db62d654b 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct BrakeSpecificFuelConsumption : IComparable, IComparable + public partial class BrakeSpecificFuelConsumption : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs index aadea1f0ba..5ece36c971 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Capacitance is the ability of a body to store an electric charge. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Capacitance : IComparable, IComparable + public partial class Capacitance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs index c6f7ba50ad..6e784a6c78 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The density, or more precisely, the volumetric mass density, of a substance is its mass per unit volume. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Density : IComparable, IComparable + public partial class Density : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs index a79dbc61c0..a26f738cb1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Duration : IComparable, IComparable + public partial class Duration : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs index d9ce2d1c0f..a43bc34568 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.NetFramework.g.cs @@ -52,8 +52,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 /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct DynamicViscosity : IComparable, IComparable + public partial class DynamicViscosity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs index e3b6f3a675..87dd832b66 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.NetFramework.g.cs @@ -52,8 +52,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). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricAdmittance : IComparable, IComparable + public partial class ElectricAdmittance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs index 3b730d7636..0c91685569 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Electric charge is the physical property of matter that causes it to experience a force when placed in an electromagnetic field. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricCharge : IComparable, IComparable + public partial class ElectricCharge : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs index 8acc8b5ae7..25af141b0c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In electromagnetism, charge density is a measure of the amount of electric charge per unit length, surface area, or volume. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricChargeDensity : IComparable, IComparable + public partial class ElectricChargeDensity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs index 070ece5b15..ed5073ea37 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The electrical conductance of an electrical conductor is a measure of the easeness to pass an electric current through that conductor. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricConductance : IComparable, IComparable + public partial class ElectricConductance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs index 6ce3b2e513..19807f5b0c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricConductivity : IComparable, IComparable + public partial class ElectricConductivity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs index 8871210be8..d73e915148 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricCurrent : IComparable, IComparable + public partial class ElectricCurrent : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs index 3539d817cb..cd195e2c3f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In electromagnetism, current density is the electric current per unit area of cross section. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricCurrentDensity : IComparable, IComparable + public partial class ElectricCurrentDensity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs index a6c8c1147b..081fd90252 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In electromagnetism, the current gradient describes how the current changes in time. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricCurrentGradient : IComparable, IComparable + public partial class ElectricCurrentGradient : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs index ebe7da9c35..42943af6ef 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// An electric field is a force field that surrounds electric charges that attracts or repels other electric charges. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricField : IComparable, IComparable + public partial class ElectricField : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs index fd65f779ff..99287f3427 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Inductance is a property of an electrical conductor which opposes a change in current. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricInductance : IComparable, IComparable + public partial class ElectricInductance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs index 5274b4408b..a37c856d25 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricPotential : IComparable, IComparable + public partial class ElectricPotential : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs index 1cc663ba20..9b9faecf33 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The Electric Potential of a system known to use Alternating Current. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricPotentialAc : IComparable, IComparable + public partial class ElectricPotentialAc : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs index 27cca700b0..3e0e014633 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The Electric Potential of a system known to use Direct Current. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricPotentialDc : IComparable, IComparable + public partial class ElectricPotentialDc : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs index 3e8a9c21ab..9c76a65a70 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The electrical resistance of an electrical conductor is the opposition to the passage of an electric current through that conductor. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricResistance : IComparable, IComparable + public partial class ElectricResistance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs index d99910acb6..b8dc55e9e7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ElectricResistivity : IComparable, IComparable + public partial class ElectricResistivity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs index df820fd0f7..9f5fa2186b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Energy : IComparable, IComparable + public partial class Energy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs index fed433b0eb..52ce11fc76 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.NetFramework.g.cs @@ -52,8 +52,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 /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Entropy : IComparable, IComparable + public partial class Entropy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs index fea2fa4acf..e5ce67bc62 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Force : IComparable, IComparable + public partial class Force : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs index c61e9c3e84..3ca55f4474 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.NetFramework.g.cs @@ -52,8 +52,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). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ForceChangeRate : IComparable, IComparable + public partial class ForceChangeRate : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs index 7ab074def9..10015be9da 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The magnitude of force per unit length. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ForcePerLength : IComparable, IComparable + public partial class ForcePerLength : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs index 7bb6f55ee9..15d915eab3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The number of occurrences of a repeating event per unit time. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Frequency : IComparable, IComparable + public partial class Frequency : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs index 84ecd3f8ba..4478754528 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Heat flux is the flow of energy per unit of area per unit of time /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct HeatFlux : IComparable, IComparable + public partial class HeatFlux : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs index 8108210b8e..315bc4f321 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.NetFramework.g.cs @@ -52,8 +52,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) /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct HeatTransferCoefficient : IComparable, IComparable + public partial class HeatTransferCoefficient : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs index bd3a431902..b8c8015c1a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In photometry, illuminance is the total luminous flux incident on a surface, per unit area. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Illuminance : IComparable, IComparable + public partial class Illuminance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs index 7a9bd15f06..25a18ea2c7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Information : IComparable, IComparable + public partial class Information : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs index dfdc82a528..db0a458951 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Irradiance is the intensity of ultraviolet (UV) or visible light incident on a surface. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Irradiance : IComparable, IComparable + public partial class Irradiance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs index 14e0412c7e..e33aa064df 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Irradiation : IComparable, IComparable + public partial class Irradiation : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs index df4c9fa5ea..c701802c5d 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The viscosity of a fluid is a measure of its resistance to gradual deformation by shear stress or tensile stress. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct KinematicViscosity : IComparable, IComparable + public partial class KinematicViscosity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs index bfb092ff67..8e5ecfad4d 100644 --- a/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LapseRate.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct LapseRate : IComparable, IComparable + public partial class LapseRate : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs index 555d9d433c..3a72b3f505 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Length : IComparable, IComparable + public partial class Length : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs index cbefbe65ed..b9ee6fc878 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Level : IComparable, IComparable + public partial class Level : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs index fcb1d06321..e4c6a8aeec 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.NetFramework.g.cs @@ -52,8 +52,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. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct LinearDensity : IComparable, IComparable + public partial class LinearDensity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs index d14b4ee9e4..6670e72415 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In photometry, luminous flux or luminous power is the measure of the perceived power of light. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct LuminousFlux : IComparable, IComparable + public partial class LuminousFlux : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs index c26523eddc..5e4333c61a 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In photometry, luminous intensity is a measure of the wavelength-weighted power emitted by a light source in a particular direction per unit solid angle, based on the luminosity function, a standardized model of the sensitivity of the human eye. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct LuminousIntensity : IComparable, IComparable + public partial class LuminousIntensity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs index 067cea1f87..d7379c10d3 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// A magnetic field is a force field that is created by moving electric charges (electric currents) and magnetic dipoles, and exerts a force on other nearby moving charges and magnetic dipoles. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MagneticField : IComparable, IComparable + public partial class MagneticField : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs index 4422776439..37a79936f3 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In physics, specifically electromagnetism, the magnetic flux through a surface is the surface integral of the normal component of the magnetic field B passing through that surface. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MagneticFlux : IComparable, IComparable + public partial class MagneticFlux : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs index 3ca49af665..940ee2cdc8 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In classical electromagnetism, magnetization is the vector field that expresses the density of permanent or induced magnetic dipole moments in a magnetic material. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Magnetization : IComparable, IComparable + public partial class Magnetization : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs index 86076f6624..45acb3da4e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In physics, mass (from Greek μᾶζα "barley cake, lump [of dough]") is a property of a physical system or body, giving rise to the phenomena of the body's resistance to being accelerated by a force and the strength of its mutual gravitational attraction with other bodies. Instruments such as mass balances or scales use those phenomena to measure mass. The SI unit of mass is the kilogram (kg). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Mass : IComparable, IComparable + public partial class Mass : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs index bf68b78921..6b08a882c6 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Mass flow is the ratio of the mass change to the time during which the change occurred (value of mass changes per unit time). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MassFlow : IComparable, IComparable + public partial class MassFlow : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs index db65fd8e30..227227ecec 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Mass flux is the mass flow rate per unit area. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MassFlux : IComparable, IComparable + public partial class MassFlux : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs index aefa2e81c8..e78fb01f4e 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// A property of body reflects how its mass is distributed with regard to an axis. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MassMomentOfInertia : IComparable, IComparable + public partial class MassMomentOfInertia : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs index 80d8afb19f..1931123f65 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Molar energy is the amount of energy stored in 1 mole of a substance. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MolarEnergy : IComparable, IComparable + public partial class MolarEnergy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs index 41d856b93b..702645f638 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Molar entropy is amount of energy required to increase temperature of 1 mole substance by 1 Kelvin. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MolarEntropy : IComparable, IComparable + public partial class MolarEntropy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs index 52f9603a76..0fa099fed5 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In chemistry, the molar mass M is a physical property defined as the mass of a given substance (chemical element or chemical compound) divided by the amount of substance. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct MolarMass : IComparable, IComparable + public partial class MolarMass : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs index 2d95d42b4a..41c4ed92dc 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Molar concentration, also called molarity, amount concentration or substance concentration, is a measure of the concentration of a solute in a solution, or of any chemical species, in terms of amount of substance in a given volume. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Molarity : IComparable, IComparable + public partial class Molarity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs index 81e66bc7d2..c6d8994505 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In electromagnetism, permeability is the measure of the ability of a material to support the formation of a magnetic field within itself. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Permeability : IComparable, IComparable + public partial class Permeability : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs index 07356c0d81..bfb92c00e5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In electromagnetism, permittivity is the measure of resistance that is encountered when forming an electric field in a particular medium. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Permittivity : IComparable, IComparable + public partial class Permittivity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs index c2829747c5..34bfae6109 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In physics, power is the rate of doing work. It is equivalent to an amount of energy consumed per unit time. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Power : IComparable, IComparable + public partial class Power : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs index 215fba3ef2..8c47811beb 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The amount of power in a volume. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct PowerDensity : IComparable, IComparable + public partial class PowerDensity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs index 53e5e4ec00..1ea12571db 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The strength of a signal expressed in decibels (dB) relative to one watt. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct PowerRatio : IComparable, IComparable + public partial class PowerRatio : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs index 1591939f2f..ec9d23a430 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Pressure (symbol: P or p) is the ratio of force to the area over which that force is distributed. Pressure is force per unit area applied in a direction perpendicular to the surface of an object. Gauge pressure (also spelled gage pressure)[a] is the pressure relative to the local atmospheric or ambient pressure. Pressure is measured in any unit of force divided by any unit of area. The SI unit of pressure is the newton per square metre, which is called the pascal (Pa) after the seventeenth-century philosopher and scientist Blaise Pascal. A pressure of 1 Pa is small; it approximately equals the pressure exerted by a dollar bill resting flat on a table. Everyday pressures are often stated in kilopascals (1 kPa = 1000 Pa). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Pressure : IComparable, IComparable + public partial class Pressure : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs index 4f19dd87ed..5385ac0513 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Pressure change rate is the ratio of the pressure change to the time during which the change occurred (value of pressure changes per unit time). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct PressureChangeRate : IComparable, IComparable + public partial class PressureChangeRate : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs index 8598f87910..bcc7b7ae69 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In mathematics, a ratio is a relationship between two numbers of the same kind (e.g., objects, persons, students, spoonfuls, units of whatever identical dimension), usually expressed as "a to b" or a:b, sometimes expressed arithmetically as a dimensionless quotient of the two that explicitly indicates how many times the first number contains the second (not necessarily an integer). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Ratio : IComparable, IComparable + public partial class Ratio : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs index db75cedd3d..22c3358263 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The Volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ReactiveEnergy : IComparable, IComparable + public partial class ReactiveEnergy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs index a65bfc0bdc..928c5f08f9 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Volt-ampere reactive (var) is a unit by which reactive power is expressed in an AC electric power system. Reactive power exists in an AC circuit when the current and voltage are not in phase. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ReactivePower : IComparable, IComparable + public partial class ReactivePower : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs index e61be585d8..ec9a05667f 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Angular acceleration is the rate of change of rotational speed. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct RotationalAcceleration : IComparable, IComparable + public partial class RotationalAcceleration : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs index 8bb5adb58f..3572b5b3b9 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Rotational speed (sometimes called speed of revolution) is the number of complete rotations, revolutions, cycles, or turns per time unit. Rotational speed is a cyclic frequency, measured in radians per second or in hertz in the SI System by scientists, or in revolutions per minute (rpm or min-1) or revolutions per second in everyday life. The symbol for rotational speed is ω (the Greek lowercase letter "omega"). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct RotationalSpeed : IComparable, IComparable + public partial class RotationalSpeed : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs index cb5e6ae90a..f71ab6b8cc 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// https://en.wikipedia.org/wiki/Stiffness#Rotational_stiffness /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct RotationalStiffness : IComparable, IComparable + public partial class RotationalStiffness : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs index f25f52cf57..fee647beee 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// https://en.wikipedia.org/wiki/Stiffness#Rotational_stiffness /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct RotationalStiffnessPerLength : IComparable, IComparable + public partial class RotationalStiffnessPerLength : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs index f5b2911984..6e5bc9663e 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In geometry, a solid angle is the two-dimensional angle in three-dimensional space that an object subtends at a point. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct SolidAngle : IComparable, IComparable + public partial class SolidAngle : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs index 1b8bfa30e4..ade79ee325 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The SpecificEnergy /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct SpecificEnergy : IComparable, IComparable + public partial class SpecificEnergy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs index 9bb56976fc..c113cfd317 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Specific entropy is an amount of energy required to raise temperature of a substance by 1 Kelvin per unit mass. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct SpecificEntropy : IComparable, IComparable + public partial class SpecificEntropy : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs index 515e44ad2e..5419118d37 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In thermodynamics, the specific volume of a substance is the ratio of the substance's volume to its mass. It is the reciprocal of density and an intrinsic property of matter as well. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct SpecificVolume : IComparable, IComparable + public partial class SpecificVolume : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs index 8c5f837d8c..13a05a23df 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// The SpecificWeight, or more precisely, the volumetric weight density, of a substance is its weight per unit volume. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct SpecificWeight : IComparable, IComparable + public partial class SpecificWeight : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs index 1e0b626c3b..44a14d87c6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In everyday use and in kinematics, the speed of an object is the magnitude of its velocity (the rate of change of its position); it is thus a scalar quantity.[1] The average speed of an object in an interval of time is the distance travelled by the object divided by the duration of the interval;[2] the instantaneous speed is the limit of the average speed as the duration of the time interval approaches zero. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Speed : IComparable, IComparable + public partial class Speed : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs index c723d62da2..54f9695bc2 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// A temperature is a numerical measure of hot or cold. Its measurement is by detection of heat radiation or particle velocity or kinetic energy, or by the bulk behavior of a thermometric material. It may be calibrated in any of various temperature scales, Celsius, Fahrenheit, Kelvin, etc. The fundamental physical definition of temperature is provided by thermodynamics. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Temperature : IComparable, IComparable + public partial class Temperature : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs index ffbe4cf16a..f151eebdf9 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Temperature change rate is the ratio of the temperature change to the time during which the change occurred (value of temperature changes per unit time). /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct TemperatureChangeRate : IComparable, IComparable + public partial class TemperatureChangeRate : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs index e5bdee0b8d..63bed0586c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Difference between two temperatures. The conversions are different than for Temperature. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct TemperatureDelta : IComparable, IComparable + public partial class TemperatureDelta : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs index 79852a7b14..58ba69fc4d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Thermal conductivity is the property of a material to conduct heat. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ThermalConductivity : IComparable, IComparable + public partial class ThermalConductivity : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs index 5852961f37..affffb8170 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Heat Transfer Coefficient or Thermal conductivity - indicates a materials ability to conduct heat. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct ThermalResistance : IComparable, IComparable + public partial class ThermalResistance : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs index 997983261d..105c2aacc4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Torque, moment or moment of force (see the terminology below), is the tendency of a force to rotate an object about an axis,[1] fulcrum, or pivot. Just as a force is a push or a pull, a torque can be thought of as a twist to an object. Mathematically, torque is defined as the cross product of the lever-arm distance and force, which tends to produce rotation. Loosely speaking, torque is a measure of the turning force on an object such as a bolt or a flywheel. For example, pushing or pulling the handle of a wrench connected to a nut or bolt produces a torque (turning force) that loosens or tightens the nut or bolt. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Torque : IComparable, IComparable + public partial class Torque : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs index 940e7bf0b6..329634e87c 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Vitamin A: 1 IU is the biological equivalent of 0.3 µg retinol, or of 0.6 µg beta-carotene. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct VitaminA : IComparable, IComparable + public partial class VitaminA : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs index 81e0f4c884..7ecc16d430 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// Volume is the quantity of three-dimensional space enclosed by some closed boundary, for example, the space that a substance (solid, liquid, gas, or plasma) or shape occupies or contains.[1] Volume is often quantified numerically using the SI derived unit, the cubic metre. The volume of a container is generally understood to be the capacity of the container, i. e. the amount of fluid (gas or liquid) that the container could hold, rather than the amount of space the container itself displaces. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct Volume : IComparable, IComparable + public partial class Volume : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs index 144be8f24b..9dbbc7761f 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.NetFramework.g.cs @@ -52,8 +52,7 @@ namespace UnitsNet /// In physics and engineering, in particular fluid dynamics and hydrometry, the volumetric flow rate, (also known as volume flow rate, rate of fluid flow or volume velocity) is the volume of fluid which passes through a given surface per unit time. The SI unit is m³/s (cubic meters per second). In US Customary Units and British Imperial Units, volumetric flow rate is often expressed as ft³/s (cubic feet per second). It is usually represented by the symbol Q. /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct VolumeFlow : IComparable, IComparable + public partial class VolumeFlow : IComparable, IComparable { /// /// The numeric value this quantity was constructed with. diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeCommon.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeCommon.ps1 index 020ede7da5..ae395a71f7 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeCommon.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeCommon.ps1 @@ -100,15 +100,7 @@ if ($obsoleteAttribute) /// $($quantity.XmlDoc) /// // ReSharper disable once PartialTypeWithSinglePart$($obsoleteAttribute) - - // Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components - // Public structures can't have any members other than public fields, and those fields must be value types or strings. - // Public classes must be sealed (NotInheritable in Visual Basic). If your programming model requires polymorphism, you can create a public interface and implement that interface on the classes that must be polymorphic. -#if WINDOWS_UWP - public sealed partial class $quantityName : IQuantity -#else - public partial struct $quantityName : IQuantity, IComparable, IComparable<$quantityName> -#endif + public partial class $quantityName : IQuantity { /// /// The numeric value this quantity was constructed with. @@ -275,6 +267,9 @@ if ($obsoleteAttribute) #endif int CompareTo($quantityName other) { + if(other is null) + throw new ArgumentNullException(nameof(other)); + return _value.CompareTo(other.AsBaseNumericType(this.Unit)); } diff --git a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 index 128543bb3f..652afca841 100644 --- a/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 +++ b/UnitsNet/Scripts/Include-GenerateQuantitySourceCodeNetFramework.ps1 @@ -93,8 +93,7 @@ namespace UnitsNet /// $($quantity.XmlDoc) /// // ReSharper disable once PartialTypeWithSinglePart - - public partial struct $quantityName : IComparable, IComparable<$quantityName> + public partial class $quantityName : IComparable, IComparable<$quantityName> { /// /// The numeric value this quantity was constructed with.