diff --git a/UnitsNet.Tests/DecimalOverloadTests.cs b/UnitsNet.Tests/DecimalOverloadTests.cs index 3b38d2e36e..6865026af6 100644 --- a/UnitsNet.Tests/DecimalOverloadTests.cs +++ b/UnitsNet.Tests/DecimalOverloadTests.cs @@ -1,16 +1,16 @@ // Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -20,8 +20,6 @@ // THE SOFTWARE. using Xunit; -using UnitsNet.Extensions.NumberToAcceleration; -using UnitsNet.Extensions.NumberToPower; namespace UnitsNet.Tests { @@ -30,32 +28,14 @@ public class DecimalOverloadTests [Fact] public static void CreatingQuantityWithDoubleBackingFieldFromDecimalReturnsCorrectValue() { - decimal oneMeterPerSecondSquared = 1m; - Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(oneMeterPerSecondSquared); - Assert.Equal(1.0, acceleration.MetersPerSecondSquared); - } - - [Fact] - public static void CreatingQuantityWithDoubleBackingFieldFromDecimalWithExtensionMethodReturnsCorrectValue() - { - decimal oneMeterPerSecondSquared = 1m; - Acceleration acceleration = oneMeterPerSecondSquared.MetersPerSecondSquared(); + Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(1m); Assert.Equal(1.0, acceleration.MetersPerSecondSquared); } [Fact] public static void CreatingQuantityWithDecimalBackingFieldFromDecimalReturnsCorrectValue() { - decimal oneWatt = 1m; - Power power = Power.FromWatts(oneWatt); - Assert.Equal(1.0, power.Watts); - } - - [Fact] - public static void CreatingQuantityWithDecimalBackingFieldFromDecimalWithExtensionMethodReturnsCorrectValue() - { - decimal oneWatt = 1m; - Power power = oneWatt.Watts(); + Power power = Power.FromWatts(1m); Assert.Equal(1.0, power.Watts); } } diff --git a/UnitsNet.Tests/Extensions/NumberToTimeSpan/NumberToTimeSpanExtensionsTest.cs b/UnitsNet.Tests/Extensions/NumberToTimeSpan/NumberToTimeSpanExtensionsTest.cs deleted file mode 100644 index de5e702403..0000000000 --- a/UnitsNet.Tests/Extensions/NumberToTimeSpan/NumberToTimeSpanExtensionsTest.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; -using Xunit; -using UnitsNet.Extensions.NumberToTimeSpan; - -namespace UnitsNet.Tests.Extensions.NumberToTimeSpan -{ - public class NumberToTimeSpanExtensionsTest - { - [Fact] - public void ExtensionMethodsReturnTimeSpanOfSameValue() - { - Assert.Equal(TimeSpan.FromDays(1), 1.d()); - Assert.Equal(TimeSpan.FromDays(1), 1L.d()); - Assert.Equal(TimeSpan.FromDays(1), 1f.d()); - Assert.Equal(TimeSpan.FromDays(1), 1d.d()); - Assert.Equal(TimeSpan.FromDays(1), 1m.d()); - - Assert.Equal(TimeSpan.FromHours(1), 1.h()); - Assert.Equal(TimeSpan.FromHours(1), 1L.h()); - Assert.Equal(TimeSpan.FromHours(1), 1f.h()); - Assert.Equal(TimeSpan.FromHours(1), 1d.h()); - Assert.Equal(TimeSpan.FromHours(1), 1m.h()); - - Assert.Equal(TimeSpan.FromMinutes(1), 1.m()); - Assert.Equal(TimeSpan.FromMinutes(1), 1L.m()); - Assert.Equal(TimeSpan.FromMinutes(1), 1f.m()); - Assert.Equal(TimeSpan.FromMinutes(1), 1d.m()); - Assert.Equal(TimeSpan.FromMinutes(1), 1m.m()); - - Assert.Equal(TimeSpan.FromSeconds(1), 1.s()); - Assert.Equal(TimeSpan.FromSeconds(1), 1L.s()); - Assert.Equal(TimeSpan.FromSeconds(1), 1f.s()); - Assert.Equal(TimeSpan.FromSeconds(1), 1d.s()); - Assert.Equal(TimeSpan.FromSeconds(1), 1m.s()); - - Assert.Equal(TimeSpan.FromMilliseconds(1), 1.ms()); - Assert.Equal(TimeSpan.FromMilliseconds(1), 1L.ms()); - Assert.Equal(TimeSpan.FromMilliseconds(1), 1f.ms()); - Assert.Equal(TimeSpan.FromMilliseconds(1), 1d.ms()); - Assert.Equal(TimeSpan.FromMilliseconds(1), 1m.ms()); - } - } -} diff --git a/UnitsNet.Tests/IntOverloadTests.cs b/UnitsNet.Tests/IntOverloadTests.cs index 1ffc8c75fa..c1aa279748 100644 --- a/UnitsNet.Tests/IntOverloadTests.cs +++ b/UnitsNet.Tests/IntOverloadTests.cs @@ -1,16 +1,16 @@ // Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -20,8 +20,6 @@ // THE SOFTWARE. using Xunit; -using UnitsNet.Extensions.NumberToAcceleration; -using UnitsNet.Extensions.NumberToPower; namespace UnitsNet.Tests { @@ -30,32 +28,14 @@ public class IntOverloadTests [Fact] public static void CreatingQuantityWithDoubleBackingFieldFromIntReturnsCorrectValue() { - int oneMeterPerSecondSquared = 1; - Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(oneMeterPerSecondSquared); - Assert.Equal(1.0, acceleration.MetersPerSecondSquared); - } - - [Fact] - public static void CreatingQuantityWithDoubleBackingFieldFromIntWithExtensionMethodReturnsCorrectValue() - { - int oneMeterPerSecondSquared = 1; - Acceleration acceleration = oneMeterPerSecondSquared.MetersPerSecondSquared(); + Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(1); Assert.Equal(1.0, acceleration.MetersPerSecondSquared); } [Fact] public static void CreatingQuantityWithIntBackingFieldFromIntReturnsCorrectValue() { - int oneWatt = 1; - Power power = Power.FromWatts(oneWatt); - Assert.Equal(1.0, power.Watts); - } - - [Fact] - public static void CreatingQuantityWithIntBackingFieldFromIntWithExtensionMethodReturnsCorrectValue() - { - int oneWatt = 1; - Power power = oneWatt.Watts(); + Power power = Power.FromWatts(1); Assert.Equal(1.0, power.Watts); } } diff --git a/UnitsNet.Tests/LongOverloadTests.cs b/UnitsNet.Tests/LongOverloadTests.cs index 97851720bf..2423091f72 100644 --- a/UnitsNet.Tests/LongOverloadTests.cs +++ b/UnitsNet.Tests/LongOverloadTests.cs @@ -1,16 +1,16 @@ // Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). // https://github.com/angularsen/UnitsNet -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -20,8 +20,6 @@ // THE SOFTWARE. using Xunit; -using UnitsNet.Extensions.NumberToAcceleration; -using UnitsNet.Extensions.NumberToPower; namespace UnitsNet.Tests { @@ -30,32 +28,14 @@ public class LongOverloadTests [Fact] public static void CreatingQuantityWithDoubleBackingFieldFromLongReturnsCorrectValue() { - long oneMeterPerSecondSquared = 1; - Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(oneMeterPerSecondSquared); - Assert.Equal(1.0, acceleration.MetersPerSecondSquared); - } - - [Fact] - public static void CreatingQuantityWithDoubleBackingFieldFromLongWithExtensionMethodReturnsCorrectValue() - { - long oneMeterPerSecondSquared = 1; - Acceleration acceleration = oneMeterPerSecondSquared.MetersPerSecondSquared(); + Acceleration acceleration = Acceleration.FromMetersPerSecondSquared(1L); Assert.Equal(1.0, acceleration.MetersPerSecondSquared); } [Fact] public static void CreatingQuantityWithLongBackingFieldFromLongReturnsCorrectValue() { - long oneWatt = 1; - Power power = Power.FromWatts(oneWatt); - Assert.Equal(1.0, power.Watts); - } - - [Fact] - public static void CreatingQuantityWithLongBackingFieldFromLongWithExtensionMethodReturnsCorrectValue() - { - long oneWatt = 1; - Power power = oneWatt.Watts(); + Power power = Power.FromWatts(1L); Assert.Equal(1.0, power.Watts); } } diff --git a/UnitsNet.Tests/NumberExtensionsTest.cs b/UnitsNet.Tests/NumberExtensionsTest.cs deleted file mode 100644 index b79ab02e44..0000000000 --- a/UnitsNet.Tests/NumberExtensionsTest.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using Xunit; -using UnitsNet.Extensions.NumberToAngle; -using UnitsNet.Extensions.NumberToForce; -using UnitsNet.Extensions.NumberToLength; -using UnitsNet.Extensions.NumberToMass; - -namespace UnitsNet.Tests -{ - public class NumberExtensionsTest - { - [Fact] - public void SomeArbitraryExtensionMethods_CreatesCorrectValue() - { - Assert.Equal(Length.FromMeters(1), 1.Meters()); - Assert.Equal(Mass.FromTonnes(2), 2.Tonnes()); - Assert.Equal(Force.FromKiloPonds(3), 3.KiloPonds()); - Assert.Equal(Angle.FromRadians(3), 3.Radians()); - } - } -} diff --git a/UnitsNet/Extensions/NumberToTimeSpan/NumberToTimeSpanExtensions.cs b/UnitsNet/Extensions/NumberToTimeSpan/NumberToTimeSpanExtensions.cs deleted file mode 100644 index 105ab5df8a..0000000000 --- a/UnitsNet/Extensions/NumberToTimeSpan/NumberToTimeSpanExtensions.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if !WINDOWS_UWP -// Extension methods/overloads not supported in Universal Windows Platform (WinRT Components) -using System; - -namespace UnitsNet.Extensions.NumberToTimeSpan -{ - public static class NumberToTimeSpanExtensions - { - // ReSharper disable InconsistentNaming - /// Shorthand for . - public static TimeSpan d(this int days) => TimeSpan.FromDays(days); - - /// Shorthand for . - public static TimeSpan d(this long days) => TimeSpan.FromDays(days); - - /// Shorthand for . - public static TimeSpan d(this float days) => TimeSpan.FromDays(days); - - /// Shorthand for . - public static TimeSpan d(this double days) => TimeSpan.FromDays(days); - - /// Shorthand for . - public static TimeSpan d(this decimal days) => TimeSpan.FromDays(Convert.ToDouble(days)); - - /// Shorthand for . - public static TimeSpan h(this int hours) => TimeSpan.FromHours(hours); - - /// Shorthand for . - public static TimeSpan h(this long hours) => TimeSpan.FromHours(hours); - - /// Shorthand for . - public static TimeSpan h(this float hours) => TimeSpan.FromHours(hours); - - /// Shorthand for . - public static TimeSpan h(this double hours) => TimeSpan.FromHours(hours); - - /// Shorthand for . - public static TimeSpan h(this decimal hours) => TimeSpan.FromHours(Convert.ToDouble(hours)); - - /// Shorthand for . - public static TimeSpan m(this int minutes) => TimeSpan.FromMinutes(minutes); - - /// Shorthand for . - public static TimeSpan m(this long minutes) => TimeSpan.FromMinutes(minutes); - - /// Shorthand for . - public static TimeSpan m(this float minutes) => TimeSpan.FromMinutes(minutes); - - /// Shorthand for . - public static TimeSpan m(this double minutes) => TimeSpan.FromMinutes(minutes); - - /// Shorthand for . - public static TimeSpan m(this decimal minutes) => TimeSpan.FromMinutes(Convert.ToDouble(minutes)); - - /// Shorthand for . - public static TimeSpan s(this int seconds) => TimeSpan.FromSeconds(seconds); - - /// Shorthand for . - public static TimeSpan s(this long seconds) => TimeSpan.FromSeconds(seconds); - - /// Shorthand for . - public static TimeSpan s(this float seconds) => TimeSpan.FromSeconds(seconds); - - /// Shorthand for . - public static TimeSpan s(this double seconds) => TimeSpan.FromSeconds(seconds); - - /// Shorthand for . - public static TimeSpan s(this decimal seconds) => TimeSpan.FromSeconds(Convert.ToDouble(seconds)); - - /// Shorthand for . - public static TimeSpan ms(this int milliseconds) => TimeSpan.FromMilliseconds(milliseconds); - - /// Shorthand for . - public static TimeSpan ms(this long milliseconds) => TimeSpan.FromMilliseconds(milliseconds); - - /// Shorthand for . - public static TimeSpan ms(this float milliseconds) => TimeSpan.FromMilliseconds(milliseconds); - - /// Shorthand for . - public static TimeSpan ms(this double milliseconds) => TimeSpan.FromMilliseconds(milliseconds); - - /// Shorthand for . - public static TimeSpan ms(this decimal milliseconds) => TimeSpan.FromMilliseconds(Convert.ToDouble(milliseconds)); - - // ReSharper restore InconsistentNaming - } -} - -#endif \ No newline at end of file diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAccelerationExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToAccelerationExtensions.g.cs deleted file mode 100644 index 7cede6880d..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAccelerationExtensions.g.cs +++ /dev/null @@ -1,88 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToAcceleration -{ - public static class NumberToAccelerationExtensions - { - /// - public static Acceleration CentimetersPerSecondSquared(this T value) => Acceleration.FromCentimetersPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration DecimetersPerSecondSquared(this T value) => Acceleration.FromDecimetersPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration FeetPerSecondSquared(this T value) => Acceleration.FromFeetPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration InchesPerSecondSquared(this T value) => Acceleration.FromInchesPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration KilometersPerSecondSquared(this T value) => Acceleration.FromKilometersPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration KnotsPerHour(this T value) => Acceleration.FromKnotsPerHour(Convert.ToDouble(value)); - - /// - public static Acceleration KnotsPerMinute(this T value) => Acceleration.FromKnotsPerMinute(Convert.ToDouble(value)); - - /// - public static Acceleration KnotsPerSecond(this T value) => Acceleration.FromKnotsPerSecond(Convert.ToDouble(value)); - - /// - public static Acceleration MetersPerSecondSquared(this T value) => Acceleration.FromMetersPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration MicrometersPerSecondSquared(this T value) => Acceleration.FromMicrometersPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration MillimetersPerSecondSquared(this T value) => Acceleration.FromMillimetersPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration NanometersPerSecondSquared(this T value) => Acceleration.FromNanometersPerSecondSquared(Convert.ToDouble(value)); - - /// - public static Acceleration StandardGravity(this T value) => Acceleration.FromStandardGravity(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAmountOfSubstanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToAmountOfSubstanceExtensions.g.cs deleted file mode 100644 index 8a00acba39..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAmountOfSubstanceExtensions.g.cs +++ /dev/null @@ -1,91 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToAmountOfSubstance -{ - public static class NumberToAmountOfSubstanceExtensions - { - /// - public static AmountOfSubstance Centimoles(this T value) => AmountOfSubstance.FromCentimoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance CentipoundMoles(this T value) => AmountOfSubstance.FromCentipoundMoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance Decimoles(this T value) => AmountOfSubstance.FromDecimoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance DecipoundMoles(this T value) => AmountOfSubstance.FromDecipoundMoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance Kilomoles(this T value) => AmountOfSubstance.FromKilomoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance KilopoundMoles(this T value) => AmountOfSubstance.FromKilopoundMoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance Micromoles(this T value) => AmountOfSubstance.FromMicromoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance MicropoundMoles(this T value) => AmountOfSubstance.FromMicropoundMoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance Millimoles(this T value) => AmountOfSubstance.FromMillimoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance MillipoundMoles(this T value) => AmountOfSubstance.FromMillipoundMoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance Moles(this T value) => AmountOfSubstance.FromMoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance Nanomoles(this T value) => AmountOfSubstance.FromNanomoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance NanopoundMoles(this T value) => AmountOfSubstance.FromNanopoundMoles(Convert.ToDouble(value)); - - /// - public static AmountOfSubstance PoundMoles(this T value) => AmountOfSubstance.FromPoundMoles(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAmplitudeRatioExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToAmplitudeRatioExtensions.g.cs deleted file mode 100644 index 7b6ccbc891..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAmplitudeRatioExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToAmplitudeRatio -{ - public static class NumberToAmplitudeRatioExtensions - { - /// - public static AmplitudeRatio DecibelMicrovolts(this T value) => AmplitudeRatio.FromDecibelMicrovolts(Convert.ToDouble(value)); - - /// - public static AmplitudeRatio DecibelMillivolts(this T value) => AmplitudeRatio.FromDecibelMillivolts(Convert.ToDouble(value)); - - /// - public static AmplitudeRatio DecibelsUnloaded(this T value) => AmplitudeRatio.FromDecibelsUnloaded(Convert.ToDouble(value)); - - /// - public static AmplitudeRatio DecibelVolts(this T value) => AmplitudeRatio.FromDecibelVolts(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAngleExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToAngleExtensions.g.cs deleted file mode 100644 index 0b34dcbc7f..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAngleExtensions.g.cs +++ /dev/null @@ -1,91 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToAngle -{ - public static class NumberToAngleExtensions - { - /// - public static Angle Arcminutes(this T value) => Angle.FromArcminutes(Convert.ToDouble(value)); - - /// - public static Angle Arcseconds(this T value) => Angle.FromArcseconds(Convert.ToDouble(value)); - - /// - public static Angle Centiradians(this T value) => Angle.FromCentiradians(Convert.ToDouble(value)); - - /// - public static Angle Deciradians(this T value) => Angle.FromDeciradians(Convert.ToDouble(value)); - - /// - public static Angle Degrees(this T value) => Angle.FromDegrees(Convert.ToDouble(value)); - - /// - public static Angle Gradians(this T value) => Angle.FromGradians(Convert.ToDouble(value)); - - /// - public static Angle Microdegrees(this T value) => Angle.FromMicrodegrees(Convert.ToDouble(value)); - - /// - public static Angle Microradians(this T value) => Angle.FromMicroradians(Convert.ToDouble(value)); - - /// - public static Angle Millidegrees(this T value) => Angle.FromMillidegrees(Convert.ToDouble(value)); - - /// - public static Angle Milliradians(this T value) => Angle.FromMilliradians(Convert.ToDouble(value)); - - /// - public static Angle Nanodegrees(this T value) => Angle.FromNanodegrees(Convert.ToDouble(value)); - - /// - public static Angle Nanoradians(this T value) => Angle.FromNanoradians(Convert.ToDouble(value)); - - /// - public static Angle Radians(this T value) => Angle.FromRadians(Convert.ToDouble(value)); - - /// - public static Angle Revolutions(this T value) => Angle.FromRevolutions(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToApparentEnergyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToApparentEnergyExtensions.g.cs deleted file mode 100644 index 0c007ff083..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToApparentEnergyExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToApparentEnergy -{ - public static class NumberToApparentEnergyExtensions - { - /// - public static ApparentEnergy KilovoltampereHours(this T value) => ApparentEnergy.FromKilovoltampereHours(Convert.ToDouble(value)); - - /// - public static ApparentEnergy MegavoltampereHours(this T value) => ApparentEnergy.FromMegavoltampereHours(Convert.ToDouble(value)); - - /// - public static ApparentEnergy VoltampereHours(this T value) => ApparentEnergy.FromVoltampereHours(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToApparentPowerExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToApparentPowerExtensions.g.cs deleted file mode 100644 index 17f85155fd..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToApparentPowerExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToApparentPower -{ - public static class NumberToApparentPowerExtensions - { - /// - public static ApparentPower Gigavoltamperes(this T value) => ApparentPower.FromGigavoltamperes(Convert.ToDouble(value)); - - /// - public static ApparentPower Kilovoltamperes(this T value) => ApparentPower.FromKilovoltamperes(Convert.ToDouble(value)); - - /// - public static ApparentPower Megavoltamperes(this T value) => ApparentPower.FromMegavoltamperes(Convert.ToDouble(value)); - - /// - public static ApparentPower Voltamperes(this T value) => ApparentPower.FromVoltamperes(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaDensityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaDensityExtensions.g.cs deleted file mode 100644 index 6a67802f24..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaDensityExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToAreaDensity -{ - public static class NumberToAreaDensityExtensions - { - /// - public static AreaDensity KilogramsPerSquareMeter(this T value) => AreaDensity.FromKilogramsPerSquareMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaExtensions.g.cs deleted file mode 100644 index aa22221e89..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaExtensions.g.cs +++ /dev/null @@ -1,88 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToArea -{ - public static class NumberToAreaExtensions - { - /// - public static Area Acres(this T value) => Area.FromAcres(Convert.ToDouble(value)); - - /// - public static Area Hectares(this T value) => Area.FromHectares(Convert.ToDouble(value)); - - /// - public static Area SquareCentimeters(this T value) => Area.FromSquareCentimeters(Convert.ToDouble(value)); - - /// - public static Area SquareDecimeters(this T value) => Area.FromSquareDecimeters(Convert.ToDouble(value)); - - /// - public static Area SquareFeet(this T value) => Area.FromSquareFeet(Convert.ToDouble(value)); - - /// - public static Area SquareInches(this T value) => Area.FromSquareInches(Convert.ToDouble(value)); - - /// - public static Area SquareKilometers(this T value) => Area.FromSquareKilometers(Convert.ToDouble(value)); - - /// - public static Area SquareMeters(this T value) => Area.FromSquareMeters(Convert.ToDouble(value)); - - /// - public static Area SquareMicrometers(this T value) => Area.FromSquareMicrometers(Convert.ToDouble(value)); - - /// - public static Area SquareMiles(this T value) => Area.FromSquareMiles(Convert.ToDouble(value)); - - /// - public static Area SquareMillimeters(this T value) => Area.FromSquareMillimeters(Convert.ToDouble(value)); - - /// - public static Area SquareYards(this T value) => Area.FromSquareYards(Convert.ToDouble(value)); - - /// - public static Area UsSurveySquareFeet(this T value) => Area.FromUsSurveySquareFeet(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaMomentOfInertiaExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaMomentOfInertiaExtensions.g.cs deleted file mode 100644 index 1917cf1a82..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToAreaMomentOfInertiaExtensions.g.cs +++ /dev/null @@ -1,67 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToAreaMomentOfInertia -{ - public static class NumberToAreaMomentOfInertiaExtensions - { - /// - public static AreaMomentOfInertia CentimetersToTheFourth(this T value) => AreaMomentOfInertia.FromCentimetersToTheFourth(Convert.ToDouble(value)); - - /// - public static AreaMomentOfInertia DecimetersToTheFourth(this T value) => AreaMomentOfInertia.FromDecimetersToTheFourth(Convert.ToDouble(value)); - - /// - public static AreaMomentOfInertia FeetToTheFourth(this T value) => AreaMomentOfInertia.FromFeetToTheFourth(Convert.ToDouble(value)); - - /// - public static AreaMomentOfInertia InchesToTheFourth(this T value) => AreaMomentOfInertia.FromInchesToTheFourth(Convert.ToDouble(value)); - - /// - public static AreaMomentOfInertia MetersToTheFourth(this T value) => AreaMomentOfInertia.FromMetersToTheFourth(Convert.ToDouble(value)); - - /// - public static AreaMomentOfInertia MillimetersToTheFourth(this T value) => AreaMomentOfInertia.FromMillimetersToTheFourth(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToBitRateExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToBitRateExtensions.g.cs deleted file mode 100644 index 83969b3527..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToBitRateExtensions.g.cs +++ /dev/null @@ -1,127 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToBitRate -{ - public static class NumberToBitRateExtensions - { - /// - public static BitRate BitsPerSecond(this T value) => BitRate.FromBitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate BytesPerSecond(this T value) => BitRate.FromBytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate ExabitsPerSecond(this T value) => BitRate.FromExabitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate ExabytesPerSecond(this T value) => BitRate.FromExabytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate ExbibitsPerSecond(this T value) => BitRate.FromExbibitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate ExbibytesPerSecond(this T value) => BitRate.FromExbibytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate GibibitsPerSecond(this T value) => BitRate.FromGibibitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate GibibytesPerSecond(this T value) => BitRate.FromGibibytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate GigabitsPerSecond(this T value) => BitRate.FromGigabitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate GigabytesPerSecond(this T value) => BitRate.FromGigabytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate KibibitsPerSecond(this T value) => BitRate.FromKibibitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate KibibytesPerSecond(this T value) => BitRate.FromKibibytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate KilobitsPerSecond(this T value) => BitRate.FromKilobitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate KilobytesPerSecond(this T value) => BitRate.FromKilobytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate MebibitsPerSecond(this T value) => BitRate.FromMebibitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate MebibytesPerSecond(this T value) => BitRate.FromMebibytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate MegabitsPerSecond(this T value) => BitRate.FromMegabitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate MegabytesPerSecond(this T value) => BitRate.FromMegabytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate PebibitsPerSecond(this T value) => BitRate.FromPebibitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate PebibytesPerSecond(this T value) => BitRate.FromPebibytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate PetabitsPerSecond(this T value) => BitRate.FromPetabitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate PetabytesPerSecond(this T value) => BitRate.FromPetabytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate TebibitsPerSecond(this T value) => BitRate.FromTebibitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate TebibytesPerSecond(this T value) => BitRate.FromTebibytesPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate TerabitsPerSecond(this T value) => BitRate.FromTerabitsPerSecond(Convert.ToDouble(value)); - - /// - public static BitRate TerabytesPerSecond(this T value) => BitRate.FromTerabytesPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs deleted file mode 100644 index 209e93833b..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToBrakeSpecificFuelConsumptionExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToBrakeSpecificFuelConsumption -{ - public static class NumberToBrakeSpecificFuelConsumptionExtensions - { - /// - public static BrakeSpecificFuelConsumption GramsPerKiloWattHour(this T value) => BrakeSpecificFuelConsumption.FromGramsPerKiloWattHour(Convert.ToDouble(value)); - - /// - public static BrakeSpecificFuelConsumption KilogramsPerJoule(this T value) => BrakeSpecificFuelConsumption.FromKilogramsPerJoule(Convert.ToDouble(value)); - - /// - public static BrakeSpecificFuelConsumption PoundsPerMechanicalHorsepowerHour(this T value) => BrakeSpecificFuelConsumption.FromPoundsPerMechanicalHorsepowerHour(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToCapacitanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToCapacitanceExtensions.g.cs deleted file mode 100644 index 7c4f20237f..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToCapacitanceExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToCapacitance -{ - public static class NumberToCapacitanceExtensions - { - /// - public static Capacitance Farads(this T value) => Capacitance.FromFarads(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToDensityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToDensityExtensions.g.cs deleted file mode 100644 index ebcbefd1ac..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToDensityExtensions.g.cs +++ /dev/null @@ -1,163 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToDensity -{ - public static class NumberToDensityExtensions - { - /// - public static Density CentigramsPerDeciLiter(this T value) => Density.FromCentigramsPerDeciLiter(Convert.ToDouble(value)); - - /// - public static Density CentigramsPerLiter(this T value) => Density.FromCentigramsPerLiter(Convert.ToDouble(value)); - - /// - public static Density CentigramsPerMilliliter(this T value) => Density.FromCentigramsPerMilliliter(Convert.ToDouble(value)); - - /// - public static Density DecigramsPerDeciLiter(this T value) => Density.FromDecigramsPerDeciLiter(Convert.ToDouble(value)); - - /// - public static Density DecigramsPerLiter(this T value) => Density.FromDecigramsPerLiter(Convert.ToDouble(value)); - - /// - public static Density DecigramsPerMilliliter(this T value) => Density.FromDecigramsPerMilliliter(Convert.ToDouble(value)); - - /// - public static Density GramsPerCubicCentimeter(this T value) => Density.FromGramsPerCubicCentimeter(Convert.ToDouble(value)); - - /// - public static Density GramsPerCubicMeter(this T value) => Density.FromGramsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static Density GramsPerCubicMillimeter(this T value) => Density.FromGramsPerCubicMillimeter(Convert.ToDouble(value)); - - /// - public static Density GramsPerDeciLiter(this T value) => Density.FromGramsPerDeciLiter(Convert.ToDouble(value)); - - /// - public static Density GramsPerLiter(this T value) => Density.FromGramsPerLiter(Convert.ToDouble(value)); - - /// - public static Density GramsPerMilliliter(this T value) => Density.FromGramsPerMilliliter(Convert.ToDouble(value)); - - /// - public static Density KilogramsPerCubicCentimeter(this T value) => Density.FromKilogramsPerCubicCentimeter(Convert.ToDouble(value)); - - /// - public static Density KilogramsPerCubicMeter(this T value) => Density.FromKilogramsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static Density KilogramsPerCubicMillimeter(this T value) => Density.FromKilogramsPerCubicMillimeter(Convert.ToDouble(value)); - - /// - public static Density KilopoundsPerCubicFoot(this T value) => Density.FromKilopoundsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static Density KilopoundsPerCubicInch(this T value) => Density.FromKilopoundsPerCubicInch(Convert.ToDouble(value)); - - /// - public static Density MicrogramsPerDeciLiter(this T value) => Density.FromMicrogramsPerDeciLiter(Convert.ToDouble(value)); - - /// - public static Density MicrogramsPerLiter(this T value) => Density.FromMicrogramsPerLiter(Convert.ToDouble(value)); - - /// - public static Density MicrogramsPerMilliliter(this T value) => Density.FromMicrogramsPerMilliliter(Convert.ToDouble(value)); - - /// - public static Density MilligramsPerCubicMeter(this T value) => Density.FromMilligramsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static Density MilligramsPerDeciLiter(this T value) => Density.FromMilligramsPerDeciLiter(Convert.ToDouble(value)); - - /// - public static Density MilligramsPerLiter(this T value) => Density.FromMilligramsPerLiter(Convert.ToDouble(value)); - - /// - public static Density MilligramsPerMilliliter(this T value) => Density.FromMilligramsPerMilliliter(Convert.ToDouble(value)); - - /// - public static Density NanogramsPerDeciLiter(this T value) => Density.FromNanogramsPerDeciLiter(Convert.ToDouble(value)); - - /// - public static Density NanogramsPerLiter(this T value) => Density.FromNanogramsPerLiter(Convert.ToDouble(value)); - - /// - public static Density NanogramsPerMilliliter(this T value) => Density.FromNanogramsPerMilliliter(Convert.ToDouble(value)); - - /// - public static Density PicogramsPerDeciLiter(this T value) => Density.FromPicogramsPerDeciLiter(Convert.ToDouble(value)); - - /// - public static Density PicogramsPerLiter(this T value) => Density.FromPicogramsPerLiter(Convert.ToDouble(value)); - - /// - public static Density PicogramsPerMilliliter(this T value) => Density.FromPicogramsPerMilliliter(Convert.ToDouble(value)); - - /// - public static Density PoundsPerCubicFoot(this T value) => Density.FromPoundsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static Density PoundsPerCubicInch(this T value) => Density.FromPoundsPerCubicInch(Convert.ToDouble(value)); - - /// - public static Density PoundsPerImperialGallon(this T value) => Density.FromPoundsPerImperialGallon(Convert.ToDouble(value)); - - /// - public static Density PoundsPerUSGallon(this T value) => Density.FromPoundsPerUSGallon(Convert.ToDouble(value)); - - /// - public static Density SlugsPerCubicFoot(this T value) => Density.FromSlugsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static Density TonnesPerCubicCentimeter(this T value) => Density.FromTonnesPerCubicCentimeter(Convert.ToDouble(value)); - - /// - public static Density TonnesPerCubicMeter(this T value) => Density.FromTonnesPerCubicMeter(Convert.ToDouble(value)); - - /// - public static Density TonnesPerCubicMillimeter(this T value) => Density.FromTonnesPerCubicMillimeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToDurationExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToDurationExtensions.g.cs deleted file mode 100644 index 9691f727c8..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToDurationExtensions.g.cs +++ /dev/null @@ -1,79 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToDuration -{ - public static class NumberToDurationExtensions - { - /// - public static Duration Days(this T value) => Duration.FromDays(Convert.ToDouble(value)); - - /// - public static Duration Hours(this T value) => Duration.FromHours(Convert.ToDouble(value)); - - /// - public static Duration Microseconds(this T value) => Duration.FromMicroseconds(Convert.ToDouble(value)); - - /// - public static Duration Milliseconds(this T value) => Duration.FromMilliseconds(Convert.ToDouble(value)); - - /// - public static Duration Minutes(this T value) => Duration.FromMinutes(Convert.ToDouble(value)); - - /// - public static Duration Months30(this T value) => Duration.FromMonths30(Convert.ToDouble(value)); - - /// - public static Duration Nanoseconds(this T value) => Duration.FromNanoseconds(Convert.ToDouble(value)); - - /// - public static Duration Seconds(this T value) => Duration.FromSeconds(Convert.ToDouble(value)); - - /// - public static Duration Weeks(this T value) => Duration.FromWeeks(Convert.ToDouble(value)); - - /// - public static Duration Years365(this T value) => Duration.FromYears365(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToDynamicViscosityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToDynamicViscosityExtensions.g.cs deleted file mode 100644 index 362f462bf0..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToDynamicViscosityExtensions.g.cs +++ /dev/null @@ -1,67 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToDynamicViscosity -{ - public static class NumberToDynamicViscosityExtensions - { - /// - public static DynamicViscosity Centipoise(this T value) => DynamicViscosity.FromCentipoise(Convert.ToDouble(value)); - - /// - public static DynamicViscosity MicropascalSeconds(this T value) => DynamicViscosity.FromMicropascalSeconds(Convert.ToDouble(value)); - - /// - public static DynamicViscosity MillipascalSeconds(this T value) => DynamicViscosity.FromMillipascalSeconds(Convert.ToDouble(value)); - - /// - public static DynamicViscosity NewtonSecondsPerMeterSquared(this T value) => DynamicViscosity.FromNewtonSecondsPerMeterSquared(Convert.ToDouble(value)); - - /// - public static DynamicViscosity PascalSeconds(this T value) => DynamicViscosity.FromPascalSeconds(Convert.ToDouble(value)); - - /// - public static DynamicViscosity Poise(this T value) => DynamicViscosity.FromPoise(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricAdmittanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricAdmittanceExtensions.g.cs deleted file mode 100644 index 9f4abe488a..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricAdmittanceExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricAdmittance -{ - public static class NumberToElectricAdmittanceExtensions - { - /// - public static ElectricAdmittance Microsiemens(this T value) => ElectricAdmittance.FromMicrosiemens(Convert.ToDouble(value)); - - /// - public static ElectricAdmittance Millisiemens(this T value) => ElectricAdmittance.FromMillisiemens(Convert.ToDouble(value)); - - /// - public static ElectricAdmittance Nanosiemens(this T value) => ElectricAdmittance.FromNanosiemens(Convert.ToDouble(value)); - - /// - public static ElectricAdmittance Siemens(this T value) => ElectricAdmittance.FromSiemens(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricChargeDensityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricChargeDensityExtensions.g.cs deleted file mode 100644 index 4c1ac1c46b..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricChargeDensityExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricChargeDensity -{ - public static class NumberToElectricChargeDensityExtensions - { - /// - public static ElectricChargeDensity CoulombsPerCubicMeter(this T value) => ElectricChargeDensity.FromCoulombsPerCubicMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricChargeExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricChargeExtensions.g.cs deleted file mode 100644 index 5573d06a98..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricChargeExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricCharge -{ - public static class NumberToElectricChargeExtensions - { - /// - public static ElectricCharge Coulombs(this T value) => ElectricCharge.FromCoulombs(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricConductanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricConductanceExtensions.g.cs deleted file mode 100644 index 843261ed40..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricConductanceExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricConductance -{ - public static class NumberToElectricConductanceExtensions - { - /// - public static ElectricConductance Microsiemens(this T value) => ElectricConductance.FromMicrosiemens(Convert.ToDouble(value)); - - /// - public static ElectricConductance Millisiemens(this T value) => ElectricConductance.FromMillisiemens(Convert.ToDouble(value)); - - /// - public static ElectricConductance Siemens(this T value) => ElectricConductance.FromSiemens(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricConductivityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricConductivityExtensions.g.cs deleted file mode 100644 index 311328fedb..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricConductivityExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricConductivity -{ - public static class NumberToElectricConductivityExtensions - { - /// - public static ElectricConductivity SiemensPerMeter(this T value) => ElectricConductivity.FromSiemensPerMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentDensityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentDensityExtensions.g.cs deleted file mode 100644 index 7ced6e9098..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentDensityExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricCurrentDensity -{ - public static class NumberToElectricCurrentDensityExtensions - { - /// - public static ElectricCurrentDensity AmperesPerSquareMeter(this T value) => ElectricCurrentDensity.FromAmperesPerSquareMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentExtensions.g.cs deleted file mode 100644 index cebeaa5cd6..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentExtensions.g.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricCurrent -{ - public static class NumberToElectricCurrentExtensions - { - /// - public static ElectricCurrent Amperes(this T value) => ElectricCurrent.FromAmperes(Convert.ToDouble(value)); - - /// - public static ElectricCurrent Centiamperes(this T value) => ElectricCurrent.FromCentiamperes(Convert.ToDouble(value)); - - /// - public static ElectricCurrent Kiloamperes(this T value) => ElectricCurrent.FromKiloamperes(Convert.ToDouble(value)); - - /// - public static ElectricCurrent Megaamperes(this T value) => ElectricCurrent.FromMegaamperes(Convert.ToDouble(value)); - - /// - public static ElectricCurrent Microamperes(this T value) => ElectricCurrent.FromMicroamperes(Convert.ToDouble(value)); - - /// - public static ElectricCurrent Milliamperes(this T value) => ElectricCurrent.FromMilliamperes(Convert.ToDouble(value)); - - /// - public static ElectricCurrent Nanoamperes(this T value) => ElectricCurrent.FromNanoamperes(Convert.ToDouble(value)); - - /// - public static ElectricCurrent Picoamperes(this T value) => ElectricCurrent.FromPicoamperes(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentGradientExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentGradientExtensions.g.cs deleted file mode 100644 index 19456d74dc..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricCurrentGradientExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricCurrentGradient -{ - public static class NumberToElectricCurrentGradientExtensions - { - /// - public static ElectricCurrentGradient AmperesPerSecond(this T value) => ElectricCurrentGradient.FromAmperesPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricFieldExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricFieldExtensions.g.cs deleted file mode 100644 index 3b18fa3e9c..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricFieldExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricField -{ - public static class NumberToElectricFieldExtensions - { - /// - public static ElectricField VoltsPerMeter(this T value) => ElectricField.FromVoltsPerMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricInductanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricInductanceExtensions.g.cs deleted file mode 100644 index 32210c78ae..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricInductanceExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricInductance -{ - public static class NumberToElectricInductanceExtensions - { - /// - public static ElectricInductance Henries(this T value) => ElectricInductance.FromHenries(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialAcExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialAcExtensions.g.cs deleted file mode 100644 index 7a9623efee..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialAcExtensions.g.cs +++ /dev/null @@ -1,64 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricPotentialAc -{ - public static class NumberToElectricPotentialAcExtensions - { - /// - public static ElectricPotentialAc KilovoltsAc(this T value) => ElectricPotentialAc.FromKilovoltsAc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialAc MegavoltsAc(this T value) => ElectricPotentialAc.FromMegavoltsAc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialAc MicrovoltsAc(this T value) => ElectricPotentialAc.FromMicrovoltsAc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialAc MillivoltsAc(this T value) => ElectricPotentialAc.FromMillivoltsAc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialAc VoltsAc(this T value) => ElectricPotentialAc.FromVoltsAc(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialDcExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialDcExtensions.g.cs deleted file mode 100644 index 0322b95071..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialDcExtensions.g.cs +++ /dev/null @@ -1,64 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricPotentialDc -{ - public static class NumberToElectricPotentialDcExtensions - { - /// - public static ElectricPotentialDc KilovoltsDc(this T value) => ElectricPotentialDc.FromKilovoltsDc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialDc MegavoltsDc(this T value) => ElectricPotentialDc.FromMegavoltsDc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialDc MicrovoltsDc(this T value) => ElectricPotentialDc.FromMicrovoltsDc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialDc MillivoltsDc(this T value) => ElectricPotentialDc.FromMillivoltsDc(Convert.ToDouble(value)); - - /// - public static ElectricPotentialDc VoltsDc(this T value) => ElectricPotentialDc.FromVoltsDc(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialExtensions.g.cs deleted file mode 100644 index ab4f96ce53..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricPotentialExtensions.g.cs +++ /dev/null @@ -1,64 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricPotential -{ - public static class NumberToElectricPotentialExtensions - { - /// - public static ElectricPotential Kilovolts(this T value) => ElectricPotential.FromKilovolts(Convert.ToDouble(value)); - - /// - public static ElectricPotential Megavolts(this T value) => ElectricPotential.FromMegavolts(Convert.ToDouble(value)); - - /// - public static ElectricPotential Microvolts(this T value) => ElectricPotential.FromMicrovolts(Convert.ToDouble(value)); - - /// - public static ElectricPotential Millivolts(this T value) => ElectricPotential.FromMillivolts(Convert.ToDouble(value)); - - /// - public static ElectricPotential Volts(this T value) => ElectricPotential.FromVolts(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricResistanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricResistanceExtensions.g.cs deleted file mode 100644 index 2ceb16ce7a..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricResistanceExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricResistance -{ - public static class NumberToElectricResistanceExtensions - { - /// - public static ElectricResistance Kiloohms(this T value) => ElectricResistance.FromKiloohms(Convert.ToDouble(value)); - - /// - public static ElectricResistance Megaohms(this T value) => ElectricResistance.FromMegaohms(Convert.ToDouble(value)); - - /// - public static ElectricResistance Milliohms(this T value) => ElectricResistance.FromMilliohms(Convert.ToDouble(value)); - - /// - public static ElectricResistance Ohms(this T value) => ElectricResistance.FromOhms(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricResistivityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricResistivityExtensions.g.cs deleted file mode 100644 index 264db20bda..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToElectricResistivityExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToElectricResistivity -{ - public static class NumberToElectricResistivityExtensions - { - /// - public static ElectricResistivity MicroohmMeters(this T value) => ElectricResistivity.FromMicroohmMeters(Convert.ToDouble(value)); - - /// - public static ElectricResistivity MilliohmMeters(this T value) => ElectricResistivity.FromMilliohmMeters(Convert.ToDouble(value)); - - /// - public static ElectricResistivity NanoohmMeters(this T value) => ElectricResistivity.FromNanoohmMeters(Convert.ToDouble(value)); - - /// - public static ElectricResistivity OhmMeters(this T value) => ElectricResistivity.FromOhmMeters(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToEnergyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToEnergyExtensions.g.cs deleted file mode 100644 index 61618ec154..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToEnergyExtensions.g.cs +++ /dev/null @@ -1,115 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToEnergy -{ - public static class NumberToEnergyExtensions - { - /// - public static Energy BritishThermalUnits(this T value) => Energy.FromBritishThermalUnits(Convert.ToDouble(value)); - - /// - public static Energy Calories(this T value) => Energy.FromCalories(Convert.ToDouble(value)); - - /// - public static Energy DecathermsEc(this T value) => Energy.FromDecathermsEc(Convert.ToDouble(value)); - - /// - public static Energy DecathermsImperial(this T value) => Energy.FromDecathermsImperial(Convert.ToDouble(value)); - - /// - public static Energy DecathermsUs(this T value) => Energy.FromDecathermsUs(Convert.ToDouble(value)); - - /// - public static Energy ElectronVolts(this T value) => Energy.FromElectronVolts(Convert.ToDouble(value)); - - /// - public static Energy Ergs(this T value) => Energy.FromErgs(Convert.ToDouble(value)); - - /// - public static Energy FootPounds(this T value) => Energy.FromFootPounds(Convert.ToDouble(value)); - - /// - public static Energy GigabritishThermalUnits(this T value) => Energy.FromGigabritishThermalUnits(Convert.ToDouble(value)); - - /// - public static Energy GigawattHours(this T value) => Energy.FromGigawattHours(Convert.ToDouble(value)); - - /// - public static Energy Joules(this T value) => Energy.FromJoules(Convert.ToDouble(value)); - - /// - public static Energy KilobritishThermalUnits(this T value) => Energy.FromKilobritishThermalUnits(Convert.ToDouble(value)); - - /// - public static Energy Kilocalories(this T value) => Energy.FromKilocalories(Convert.ToDouble(value)); - - /// - public static Energy Kilojoules(this T value) => Energy.FromKilojoules(Convert.ToDouble(value)); - - /// - public static Energy KilowattHours(this T value) => Energy.FromKilowattHours(Convert.ToDouble(value)); - - /// - public static Energy MegabritishThermalUnits(this T value) => Energy.FromMegabritishThermalUnits(Convert.ToDouble(value)); - - /// - public static Energy Megajoules(this T value) => Energy.FromMegajoules(Convert.ToDouble(value)); - - /// - public static Energy MegawattHours(this T value) => Energy.FromMegawattHours(Convert.ToDouble(value)); - - /// - public static Energy ThermsEc(this T value) => Energy.FromThermsEc(Convert.ToDouble(value)); - - /// - public static Energy ThermsImperial(this T value) => Energy.FromThermsImperial(Convert.ToDouble(value)); - - /// - public static Energy ThermsUs(this T value) => Energy.FromThermsUs(Convert.ToDouble(value)); - - /// - public static Energy WattHours(this T value) => Energy.FromWattHours(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToEntropyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToEntropyExtensions.g.cs deleted file mode 100644 index 2ff8c28351..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToEntropyExtensions.g.cs +++ /dev/null @@ -1,70 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToEntropy -{ - public static class NumberToEntropyExtensions - { - /// - public static Entropy CaloriesPerKelvin(this T value) => Entropy.FromCaloriesPerKelvin(Convert.ToDouble(value)); - - /// - public static Entropy JoulesPerDegreeCelsius(this T value) => Entropy.FromJoulesPerDegreeCelsius(Convert.ToDouble(value)); - - /// - public static Entropy JoulesPerKelvin(this T value) => Entropy.FromJoulesPerKelvin(Convert.ToDouble(value)); - - /// - public static Entropy KilocaloriesPerKelvin(this T value) => Entropy.FromKilocaloriesPerKelvin(Convert.ToDouble(value)); - - /// - public static Entropy KilojoulesPerDegreeCelsius(this T value) => Entropy.FromKilojoulesPerDegreeCelsius(Convert.ToDouble(value)); - - /// - public static Entropy KilojoulesPerKelvin(this T value) => Entropy.FromKilojoulesPerKelvin(Convert.ToDouble(value)); - - /// - public static Entropy MegajoulesPerKelvin(this T value) => Entropy.FromMegajoulesPerKelvin(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToForceChangeRateExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToForceChangeRateExtensions.g.cs deleted file mode 100644 index b58d9e2a79..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToForceChangeRateExtensions.g.cs +++ /dev/null @@ -1,82 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToForceChangeRate -{ - public static class NumberToForceChangeRateExtensions - { - /// - public static ForceChangeRate CentinewtonsPerSecond(this T value) => ForceChangeRate.FromCentinewtonsPerSecond(Convert.ToDouble(value)); - - /// - public static ForceChangeRate DecanewtonsPerMinute(this T value) => ForceChangeRate.FromDecanewtonsPerMinute(Convert.ToDouble(value)); - - /// - public static ForceChangeRate DecanewtonsPerSecond(this T value) => ForceChangeRate.FromDecanewtonsPerSecond(Convert.ToDouble(value)); - - /// - public static ForceChangeRate DecinewtonsPerSecond(this T value) => ForceChangeRate.FromDecinewtonsPerSecond(Convert.ToDouble(value)); - - /// - public static ForceChangeRate KilonewtonsPerMinute(this T value) => ForceChangeRate.FromKilonewtonsPerMinute(Convert.ToDouble(value)); - - /// - public static ForceChangeRate KilonewtonsPerSecond(this T value) => ForceChangeRate.FromKilonewtonsPerSecond(Convert.ToDouble(value)); - - /// - public static ForceChangeRate MicronewtonsPerSecond(this T value) => ForceChangeRate.FromMicronewtonsPerSecond(Convert.ToDouble(value)); - - /// - public static ForceChangeRate MillinewtonsPerSecond(this T value) => ForceChangeRate.FromMillinewtonsPerSecond(Convert.ToDouble(value)); - - /// - public static ForceChangeRate NanonewtonsPerSecond(this T value) => ForceChangeRate.FromNanonewtonsPerSecond(Convert.ToDouble(value)); - - /// - public static ForceChangeRate NewtonsPerMinute(this T value) => ForceChangeRate.FromNewtonsPerMinute(Convert.ToDouble(value)); - - /// - public static ForceChangeRate NewtonsPerSecond(this T value) => ForceChangeRate.FromNewtonsPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToForceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToForceExtensions.g.cs deleted file mode 100644 index 4e78aba2c8..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToForceExtensions.g.cs +++ /dev/null @@ -1,79 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToForce -{ - public static class NumberToForceExtensions - { - /// - public static Force Decanewtons(this T value) => Force.FromDecanewtons(Convert.ToDouble(value)); - - /// - public static Force Dyne(this T value) => Force.FromDyne(Convert.ToDouble(value)); - - /// - public static Force KilogramsForce(this T value) => Force.FromKilogramsForce(Convert.ToDouble(value)); - - /// - public static Force Kilonewtons(this T value) => Force.FromKilonewtons(Convert.ToDouble(value)); - - /// - public static Force KiloPonds(this T value) => Force.FromKiloPonds(Convert.ToDouble(value)); - - /// - public static Force Meganewtons(this T value) => Force.FromMeganewtons(Convert.ToDouble(value)); - - /// - public static Force Newtons(this T value) => Force.FromNewtons(Convert.ToDouble(value)); - - /// - public static Force Poundals(this T value) => Force.FromPoundals(Convert.ToDouble(value)); - - /// - public static Force PoundsForce(this T value) => Force.FromPoundsForce(Convert.ToDouble(value)); - - /// - public static Force TonnesForce(this T value) => Force.FromTonnesForce(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToForcePerLengthExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToForcePerLengthExtensions.g.cs deleted file mode 100644 index 7a5cd2d5a2..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToForcePerLengthExtensions.g.cs +++ /dev/null @@ -1,76 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToForcePerLength -{ - public static class NumberToForcePerLengthExtensions - { - /// - public static ForcePerLength CentinewtonsPerMeter(this T value) => ForcePerLength.FromCentinewtonsPerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength DecinewtonsPerMeter(this T value) => ForcePerLength.FromDecinewtonsPerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength KilogramsForcePerMeter(this T value) => ForcePerLength.FromKilogramsForcePerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength KilonewtonsPerMeter(this T value) => ForcePerLength.FromKilonewtonsPerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength MeganewtonsPerMeter(this T value) => ForcePerLength.FromMeganewtonsPerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength MicronewtonsPerMeter(this T value) => ForcePerLength.FromMicronewtonsPerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength MillinewtonsPerMeter(this T value) => ForcePerLength.FromMillinewtonsPerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength NanonewtonsPerMeter(this T value) => ForcePerLength.FromNanonewtonsPerMeter(Convert.ToDouble(value)); - - /// - public static ForcePerLength NewtonsPerMeter(this T value) => ForcePerLength.FromNewtonsPerMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToFrequencyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToFrequencyExtensions.g.cs deleted file mode 100644 index 313563c5e1..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToFrequencyExtensions.g.cs +++ /dev/null @@ -1,70 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToFrequency -{ - public static class NumberToFrequencyExtensions - { - /// - public static Frequency CyclesPerHour(this T value) => Frequency.FromCyclesPerHour(Convert.ToDouble(value)); - - /// - public static Frequency CyclesPerMinute(this T value) => Frequency.FromCyclesPerMinute(Convert.ToDouble(value)); - - /// - public static Frequency Gigahertz(this T value) => Frequency.FromGigahertz(Convert.ToDouble(value)); - - /// - public static Frequency Hertz(this T value) => Frequency.FromHertz(Convert.ToDouble(value)); - - /// - public static Frequency Kilohertz(this T value) => Frequency.FromKilohertz(Convert.ToDouble(value)); - - /// - public static Frequency Megahertz(this T value) => Frequency.FromMegahertz(Convert.ToDouble(value)); - - /// - public static Frequency Terahertz(this T value) => Frequency.FromTerahertz(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs deleted file mode 100644 index 737ca32544..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatFluxExtensions.g.cs +++ /dev/null @@ -1,97 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToHeatFlux -{ - public static class NumberToHeatFluxExtensions - { - /// - public static HeatFlux BtusPerHourSquareFoot(this T value) => HeatFlux.FromBtusPerHourSquareFoot(Convert.ToDouble(value)); - - /// - public static HeatFlux BtusPerMinuteSquareFoot(this T value) => HeatFlux.FromBtusPerMinuteSquareFoot(Convert.ToDouble(value)); - - /// - public static HeatFlux BtusPerSecondSquareFoot(this T value) => HeatFlux.FromBtusPerSecondSquareFoot(Convert.ToDouble(value)); - - /// - public static HeatFlux BtusPerSecondSquareInch(this T value) => HeatFlux.FromBtusPerSecondSquareInch(Convert.ToDouble(value)); - - /// - public static HeatFlux CaloriesPerSecondSquareCentimeter(this T value) => HeatFlux.FromCaloriesPerSecondSquareCentimeter(Convert.ToDouble(value)); - - /// - public static HeatFlux CentiwattsPerSquareMeter(this T value) => HeatFlux.FromCentiwattsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static HeatFlux DeciwattsPerSquareMeter(this T value) => HeatFlux.FromDeciwattsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static HeatFlux KilocaloriesPerHourSquareMeter(this T value) => HeatFlux.FromKilocaloriesPerHourSquareMeter(Convert.ToDouble(value)); - - /// - public static HeatFlux KilocaloriesPerSecondSquareCentimeter(this T value) => HeatFlux.FromKilocaloriesPerSecondSquareCentimeter(Convert.ToDouble(value)); - - /// - public static HeatFlux KilowattsPerSquareMeter(this T value) => HeatFlux.FromKilowattsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static HeatFlux MicrowattsPerSquareMeter(this T value) => HeatFlux.FromMicrowattsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static HeatFlux MilliwattsPerSquareMeter(this T value) => HeatFlux.FromMilliwattsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static HeatFlux NanowattsPerSquareMeter(this T value) => HeatFlux.FromNanowattsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static HeatFlux WattsPerSquareFoot(this T value) => HeatFlux.FromWattsPerSquareFoot(Convert.ToDouble(value)); - - /// - public static HeatFlux WattsPerSquareInch(this T value) => HeatFlux.FromWattsPerSquareInch(Convert.ToDouble(value)); - - /// - public static HeatFlux WattsPerSquareMeter(this T value) => HeatFlux.FromWattsPerSquareMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatTransferCoefficientExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatTransferCoefficientExtensions.g.cs deleted file mode 100644 index e47213f176..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToHeatTransferCoefficientExtensions.g.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToHeatTransferCoefficient -{ - public static class NumberToHeatTransferCoefficientExtensions - { - /// - public static HeatTransferCoefficient WattsPerSquareMeterCelsius(this T value) => HeatTransferCoefficient.FromWattsPerSquareMeterCelsius(Convert.ToDouble(value)); - - /// - public static HeatTransferCoefficient WattsPerSquareMeterKelvin(this T value) => HeatTransferCoefficient.FromWattsPerSquareMeterKelvin(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToIlluminanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToIlluminanceExtensions.g.cs deleted file mode 100644 index 63a4c2d79c..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToIlluminanceExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToIlluminance -{ - public static class NumberToIlluminanceExtensions - { - /// - public static Illuminance Kilolux(this T value) => Illuminance.FromKilolux(Convert.ToDouble(value)); - - /// - public static Illuminance Lux(this T value) => Illuminance.FromLux(Convert.ToDouble(value)); - - /// - public static Illuminance Megalux(this T value) => Illuminance.FromMegalux(Convert.ToDouble(value)); - - /// - public static Illuminance Millilux(this T value) => Illuminance.FromMillilux(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToInformationExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToInformationExtensions.g.cs deleted file mode 100644 index fc02154ffb..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToInformationExtensions.g.cs +++ /dev/null @@ -1,127 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToInformation -{ - public static class NumberToInformationExtensions - { - /// - public static Information Bits(this T value) => Information.FromBits(Convert.ToDouble(value)); - - /// - public static Information Bytes(this T value) => Information.FromBytes(Convert.ToDouble(value)); - - /// - public static Information Exabits(this T value) => Information.FromExabits(Convert.ToDouble(value)); - - /// - public static Information Exabytes(this T value) => Information.FromExabytes(Convert.ToDouble(value)); - - /// - public static Information Exbibits(this T value) => Information.FromExbibits(Convert.ToDouble(value)); - - /// - public static Information Exbibytes(this T value) => Information.FromExbibytes(Convert.ToDouble(value)); - - /// - public static Information Gibibits(this T value) => Information.FromGibibits(Convert.ToDouble(value)); - - /// - public static Information Gibibytes(this T value) => Information.FromGibibytes(Convert.ToDouble(value)); - - /// - public static Information Gigabits(this T value) => Information.FromGigabits(Convert.ToDouble(value)); - - /// - public static Information Gigabytes(this T value) => Information.FromGigabytes(Convert.ToDouble(value)); - - /// - public static Information Kibibits(this T value) => Information.FromKibibits(Convert.ToDouble(value)); - - /// - public static Information Kibibytes(this T value) => Information.FromKibibytes(Convert.ToDouble(value)); - - /// - public static Information Kilobits(this T value) => Information.FromKilobits(Convert.ToDouble(value)); - - /// - public static Information Kilobytes(this T value) => Information.FromKilobytes(Convert.ToDouble(value)); - - /// - public static Information Mebibits(this T value) => Information.FromMebibits(Convert.ToDouble(value)); - - /// - public static Information Mebibytes(this T value) => Information.FromMebibytes(Convert.ToDouble(value)); - - /// - public static Information Megabits(this T value) => Information.FromMegabits(Convert.ToDouble(value)); - - /// - public static Information Megabytes(this T value) => Information.FromMegabytes(Convert.ToDouble(value)); - - /// - public static Information Pebibits(this T value) => Information.FromPebibits(Convert.ToDouble(value)); - - /// - public static Information Pebibytes(this T value) => Information.FromPebibytes(Convert.ToDouble(value)); - - /// - public static Information Petabits(this T value) => Information.FromPetabits(Convert.ToDouble(value)); - - /// - public static Information Petabytes(this T value) => Information.FromPetabytes(Convert.ToDouble(value)); - - /// - public static Information Tebibits(this T value) => Information.FromTebibits(Convert.ToDouble(value)); - - /// - public static Information Tebibytes(this T value) => Information.FromTebibytes(Convert.ToDouble(value)); - - /// - public static Information Terabits(this T value) => Information.FromTerabits(Convert.ToDouble(value)); - - /// - public static Information Terabytes(this T value) => Information.FromTerabytes(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToIrradianceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToIrradianceExtensions.g.cs deleted file mode 100644 index 8b202820d6..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToIrradianceExtensions.g.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToIrradiance -{ - public static class NumberToIrradianceExtensions - { - /// - public static Irradiance KilowattsPerSquareMeter(this T value) => Irradiance.FromKilowattsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static Irradiance WattsPerSquareMeter(this T value) => Irradiance.FromWattsPerSquareMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToIrradiationExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToIrradiationExtensions.g.cs deleted file mode 100644 index f1c63a55d8..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToIrradiationExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToIrradiation -{ - public static class NumberToIrradiationExtensions - { - /// - public static Irradiation JoulesPerSquareMeter(this T value) => Irradiation.FromJoulesPerSquareMeter(Convert.ToDouble(value)); - - /// - public static Irradiation KilowattHoursPerSquareMeter(this T value) => Irradiation.FromKilowattHoursPerSquareMeter(Convert.ToDouble(value)); - - /// - public static Irradiation WattHoursPerSquareMeter(this T value) => Irradiation.FromWattHoursPerSquareMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToKinematicViscosityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToKinematicViscosityExtensions.g.cs deleted file mode 100644 index 103d3c781a..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToKinematicViscosityExtensions.g.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToKinematicViscosity -{ - public static class NumberToKinematicViscosityExtensions - { - /// - public static KinematicViscosity Centistokes(this T value) => KinematicViscosity.FromCentistokes(Convert.ToDouble(value)); - - /// - public static KinematicViscosity Decistokes(this T value) => KinematicViscosity.FromDecistokes(Convert.ToDouble(value)); - - /// - public static KinematicViscosity Kilostokes(this T value) => KinematicViscosity.FromKilostokes(Convert.ToDouble(value)); - - /// - public static KinematicViscosity Microstokes(this T value) => KinematicViscosity.FromMicrostokes(Convert.ToDouble(value)); - - /// - public static KinematicViscosity Millistokes(this T value) => KinematicViscosity.FromMillistokes(Convert.ToDouble(value)); - - /// - public static KinematicViscosity Nanostokes(this T value) => KinematicViscosity.FromNanostokes(Convert.ToDouble(value)); - - /// - public static KinematicViscosity SquareMetersPerSecond(this T value) => KinematicViscosity.FromSquareMetersPerSecond(Convert.ToDouble(value)); - - /// - public static KinematicViscosity Stokes(this T value) => KinematicViscosity.FromStokes(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLapseRateExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToLapseRateExtensions.g.cs deleted file mode 100644 index 256c0daa49..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLapseRateExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToLapseRate -{ - public static class NumberToLapseRateExtensions - { - /// - public static LapseRate DegreesCelciusPerKilometer(this T value) => LapseRate.FromDegreesCelciusPerKilometer(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLengthExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToLengthExtensions.g.cs deleted file mode 100644 index 930b5bd8fb..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLengthExtensions.g.cs +++ /dev/null @@ -1,115 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToLength -{ - public static class NumberToLengthExtensions - { - /// - public static Length Centimeters(this T value) => Length.FromCentimeters(Convert.ToDouble(value)); - - /// - public static Length Decimeters(this T value) => Length.FromDecimeters(Convert.ToDouble(value)); - - /// - public static Length DtpPicas(this T value) => Length.FromDtpPicas(Convert.ToDouble(value)); - - /// - public static Length DtpPoints(this T value) => Length.FromDtpPoints(Convert.ToDouble(value)); - - /// - public static Length Fathoms(this T value) => Length.FromFathoms(Convert.ToDouble(value)); - - /// - public static Length Feet(this T value) => Length.FromFeet(Convert.ToDouble(value)); - - /// - public static Length Inches(this T value) => Length.FromInches(Convert.ToDouble(value)); - - /// - public static Length Kilometers(this T value) => Length.FromKilometers(Convert.ToDouble(value)); - - /// - public static Length Meters(this T value) => Length.FromMeters(Convert.ToDouble(value)); - - /// - public static Length Microinches(this T value) => Length.FromMicroinches(Convert.ToDouble(value)); - - /// - public static Length Micrometers(this T value) => Length.FromMicrometers(Convert.ToDouble(value)); - - /// - public static Length Mils(this T value) => Length.FromMils(Convert.ToDouble(value)); - - /// - public static Length Miles(this T value) => Length.FromMiles(Convert.ToDouble(value)); - - /// - public static Length Millimeters(this T value) => Length.FromMillimeters(Convert.ToDouble(value)); - - /// - public static Length Nanometers(this T value) => Length.FromNanometers(Convert.ToDouble(value)); - - /// - public static Length NauticalMiles(this T value) => Length.FromNauticalMiles(Convert.ToDouble(value)); - - /// - public static Length PrinterPicas(this T value) => Length.FromPrinterPicas(Convert.ToDouble(value)); - - /// - public static Length PrinterPoints(this T value) => Length.FromPrinterPoints(Convert.ToDouble(value)); - - /// - public static Length Shackles(this T value) => Length.FromShackles(Convert.ToDouble(value)); - - /// - public static Length Twips(this T value) => Length.FromTwips(Convert.ToDouble(value)); - - /// - public static Length UsSurveyFeet(this T value) => Length.FromUsSurveyFeet(Convert.ToDouble(value)); - - /// - public static Length Yards(this T value) => Length.FromYards(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLevelExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToLevelExtensions.g.cs deleted file mode 100644 index 024d9d1b64..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLevelExtensions.g.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToLevel -{ - public static class NumberToLevelExtensions - { - /// - public static Level Decibels(this T value) => Level.FromDecibels(Convert.ToDouble(value)); - - /// - public static Level Nepers(this T value) => Level.FromNepers(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLinearDensityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToLinearDensityExtensions.g.cs deleted file mode 100644 index fcc43ec98f..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLinearDensityExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToLinearDensity -{ - public static class NumberToLinearDensityExtensions - { - /// - public static LinearDensity GramsPerMeter(this T value) => LinearDensity.FromGramsPerMeter(Convert.ToDouble(value)); - - /// - public static LinearDensity KilogramsPerMeter(this T value) => LinearDensity.FromKilogramsPerMeter(Convert.ToDouble(value)); - - /// - public static LinearDensity PoundsPerFoot(this T value) => LinearDensity.FromPoundsPerFoot(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLuminousFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToLuminousFluxExtensions.g.cs deleted file mode 100644 index 87e844ed6b..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLuminousFluxExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToLuminousFlux -{ - public static class NumberToLuminousFluxExtensions - { - /// - public static LuminousFlux Lumens(this T value) => LuminousFlux.FromLumens(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLuminousIntensityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToLuminousIntensityExtensions.g.cs deleted file mode 100644 index 6459050eb6..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToLuminousIntensityExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToLuminousIntensity -{ - public static class NumberToLuminousIntensityExtensions - { - /// - public static LuminousIntensity Candela(this T value) => LuminousIntensity.FromCandela(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagneticFieldExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagneticFieldExtensions.g.cs deleted file mode 100644 index c7657d43b0..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagneticFieldExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMagneticField -{ - public static class NumberToMagneticFieldExtensions - { - /// - public static MagneticField Teslas(this T value) => MagneticField.FromTeslas(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagneticFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagneticFluxExtensions.g.cs deleted file mode 100644 index fc48c0ef6f..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagneticFluxExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMagneticFlux -{ - public static class NumberToMagneticFluxExtensions - { - /// - public static MagneticFlux Webers(this T value) => MagneticFlux.FromWebers(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagnetizationExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagnetizationExtensions.g.cs deleted file mode 100644 index f9c977ccad..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMagnetizationExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMagnetization -{ - public static class NumberToMagnetizationExtensions - { - /// - public static Magnetization AmperesPerMeter(this T value) => Magnetization.FromAmperesPerMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassExtensions.g.cs deleted file mode 100644 index 8a20899ef2..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassExtensions.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMass -{ - public static class NumberToMassExtensions - { - /// - public static Mass Centigrams(this T value) => Mass.FromCentigrams(Convert.ToDouble(value)); - - /// - public static Mass Decagrams(this T value) => Mass.FromDecagrams(Convert.ToDouble(value)); - - /// - public static Mass Decigrams(this T value) => Mass.FromDecigrams(Convert.ToDouble(value)); - - /// - public static Mass Grams(this T value) => Mass.FromGrams(Convert.ToDouble(value)); - - /// - public static Mass Hectograms(this T value) => Mass.FromHectograms(Convert.ToDouble(value)); - - /// - public static Mass Kilograms(this T value) => Mass.FromKilograms(Convert.ToDouble(value)); - - /// - public static Mass Kilopounds(this T value) => Mass.FromKilopounds(Convert.ToDouble(value)); - - /// - public static Mass Kilotonnes(this T value) => Mass.FromKilotonnes(Convert.ToDouble(value)); - - /// - public static Mass LongHundredweight(this T value) => Mass.FromLongHundredweight(Convert.ToDouble(value)); - - /// - public static Mass LongTons(this T value) => Mass.FromLongTons(Convert.ToDouble(value)); - - /// - public static Mass Megapounds(this T value) => Mass.FromMegapounds(Convert.ToDouble(value)); - - /// - public static Mass Megatonnes(this T value) => Mass.FromMegatonnes(Convert.ToDouble(value)); - - /// - public static Mass Micrograms(this T value) => Mass.FromMicrograms(Convert.ToDouble(value)); - - /// - public static Mass Milligrams(this T value) => Mass.FromMilligrams(Convert.ToDouble(value)); - - /// - public static Mass Nanograms(this T value) => Mass.FromNanograms(Convert.ToDouble(value)); - - /// - public static Mass Ounces(this T value) => Mass.FromOunces(Convert.ToDouble(value)); - - /// - public static Mass Pounds(this T value) => Mass.FromPounds(Convert.ToDouble(value)); - - /// - public static Mass ShortHundredweight(this T value) => Mass.FromShortHundredweight(Convert.ToDouble(value)); - - /// - public static Mass ShortTons(this T value) => Mass.FromShortTons(Convert.ToDouble(value)); - - /// - public static Mass Stone(this T value) => Mass.FromStone(Convert.ToDouble(value)); - - /// - public static Mass Tonnes(this T value) => Mass.FromTonnes(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFlowExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFlowExtensions.g.cs deleted file mode 100644 index 8db4e6c06b..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFlowExtensions.g.cs +++ /dev/null @@ -1,94 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMassFlow -{ - public static class NumberToMassFlowExtensions - { - /// - public static MassFlow CentigramsPerSecond(this T value) => MassFlow.FromCentigramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow DecagramsPerSecond(this T value) => MassFlow.FromDecagramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow DecigramsPerSecond(this T value) => MassFlow.FromDecigramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow GramsPerSecond(this T value) => MassFlow.FromGramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow HectogramsPerSecond(this T value) => MassFlow.FromHectogramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow KilogramsPerHour(this T value) => MassFlow.FromKilogramsPerHour(Convert.ToDouble(value)); - - /// - public static MassFlow KilogramsPerSecond(this T value) => MassFlow.FromKilogramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow MegapoundsPerHour(this T value) => MassFlow.FromMegapoundsPerHour(Convert.ToDouble(value)); - - /// - public static MassFlow MicrogramsPerSecond(this T value) => MassFlow.FromMicrogramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow MilligramsPerSecond(this T value) => MassFlow.FromMilligramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow NanogramsPerSecond(this T value) => MassFlow.FromNanogramsPerSecond(Convert.ToDouble(value)); - - /// - public static MassFlow PoundsPerHour(this T value) => MassFlow.FromPoundsPerHour(Convert.ToDouble(value)); - - /// - public static MassFlow ShortTonsPerHour(this T value) => MassFlow.FromShortTonsPerHour(Convert.ToDouble(value)); - - /// - public static MassFlow TonnesPerDay(this T value) => MassFlow.FromTonnesPerDay(Convert.ToDouble(value)); - - /// - public static MassFlow TonnesPerHour(this T value) => MassFlow.FromTonnesPerHour(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFluxExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFluxExtensions.g.cs deleted file mode 100644 index 8a820b0508..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassFluxExtensions.g.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMassFlux -{ - public static class NumberToMassFluxExtensions - { - /// - public static MassFlux GramsPerSecondPerSquareMeter(this T value) => MassFlux.FromGramsPerSecondPerSquareMeter(Convert.ToDouble(value)); - - /// - public static MassFlux KilogramsPerSecondPerSquareMeter(this T value) => MassFlux.FromKilogramsPerSecondPerSquareMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassMomentOfInertiaExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassMomentOfInertiaExtensions.g.cs deleted file mode 100644 index 4f51429b4b..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMassMomentOfInertiaExtensions.g.cs +++ /dev/null @@ -1,127 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMassMomentOfInertia -{ - public static class NumberToMassMomentOfInertiaExtensions - { - /// - public static MassMomentOfInertia GramSquareCentimeters(this T value) => MassMomentOfInertia.FromGramSquareCentimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia GramSquareDecimeters(this T value) => MassMomentOfInertia.FromGramSquareDecimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia GramSquareMeters(this T value) => MassMomentOfInertia.FromGramSquareMeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia GramSquareMillimeters(this T value) => MassMomentOfInertia.FromGramSquareMillimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilogramSquareCentimeters(this T value) => MassMomentOfInertia.FromKilogramSquareCentimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilogramSquareDecimeters(this T value) => MassMomentOfInertia.FromKilogramSquareDecimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilogramSquareMeters(this T value) => MassMomentOfInertia.FromKilogramSquareMeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilogramSquareMillimeters(this T value) => MassMomentOfInertia.FromKilogramSquareMillimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilotonneSquareCentimeters(this T value) => MassMomentOfInertia.FromKilotonneSquareCentimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilotonneSquareDecimeters(this T value) => MassMomentOfInertia.FromKilotonneSquareDecimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilotonneSquareMeters(this T value) => MassMomentOfInertia.FromKilotonneSquareMeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia KilotonneSquareMilimeters(this T value) => MassMomentOfInertia.FromKilotonneSquareMilimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MegatonneSquareCentimeters(this T value) => MassMomentOfInertia.FromMegatonneSquareCentimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MegatonneSquareDecimeters(this T value) => MassMomentOfInertia.FromMegatonneSquareDecimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MegatonneSquareMeters(this T value) => MassMomentOfInertia.FromMegatonneSquareMeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MegatonneSquareMilimeters(this T value) => MassMomentOfInertia.FromMegatonneSquareMilimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MilligramSquareCentimeters(this T value) => MassMomentOfInertia.FromMilligramSquareCentimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MilligramSquareDecimeters(this T value) => MassMomentOfInertia.FromMilligramSquareDecimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MilligramSquareMeters(this T value) => MassMomentOfInertia.FromMilligramSquareMeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia MilligramSquareMillimeters(this T value) => MassMomentOfInertia.FromMilligramSquareMillimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia PoundSquareFeet(this T value) => MassMomentOfInertia.FromPoundSquareFeet(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia PoundSquareInches(this T value) => MassMomentOfInertia.FromPoundSquareInches(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia TonneSquareCentimeters(this T value) => MassMomentOfInertia.FromTonneSquareCentimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia TonneSquareDecimeters(this T value) => MassMomentOfInertia.FromTonneSquareDecimeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia TonneSquareMeters(this T value) => MassMomentOfInertia.FromTonneSquareMeters(Convert.ToDouble(value)); - - /// - public static MassMomentOfInertia TonneSquareMilimeters(this T value) => MassMomentOfInertia.FromTonneSquareMilimeters(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarEnergyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarEnergyExtensions.g.cs deleted file mode 100644 index 04710dbb24..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarEnergyExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMolarEnergy -{ - public static class NumberToMolarEnergyExtensions - { - /// - public static MolarEnergy JoulesPerMole(this T value) => MolarEnergy.FromJoulesPerMole(Convert.ToDouble(value)); - - /// - public static MolarEnergy KilojoulesPerMole(this T value) => MolarEnergy.FromKilojoulesPerMole(Convert.ToDouble(value)); - - /// - public static MolarEnergy MegajoulesPerMole(this T value) => MolarEnergy.FromMegajoulesPerMole(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarEntropyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarEntropyExtensions.g.cs deleted file mode 100644 index ec727f851d..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarEntropyExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMolarEntropy -{ - public static class NumberToMolarEntropyExtensions - { - /// - public static MolarEntropy JoulesPerMoleKelvin(this T value) => MolarEntropy.FromJoulesPerMoleKelvin(Convert.ToDouble(value)); - - /// - public static MolarEntropy KilojoulesPerMoleKelvin(this T value) => MolarEntropy.FromKilojoulesPerMoleKelvin(Convert.ToDouble(value)); - - /// - public static MolarEntropy MegajoulesPerMoleKelvin(this T value) => MolarEntropy.FromMegajoulesPerMoleKelvin(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarMassExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarMassExtensions.g.cs deleted file mode 100644 index 71386056cb..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarMassExtensions.g.cs +++ /dev/null @@ -1,85 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMolarMass -{ - public static class NumberToMolarMassExtensions - { - /// - public static MolarMass CentigramsPerMole(this T value) => MolarMass.FromCentigramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass DecagramsPerMole(this T value) => MolarMass.FromDecagramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass DecigramsPerMole(this T value) => MolarMass.FromDecigramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass GramsPerMole(this T value) => MolarMass.FromGramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass HectogramsPerMole(this T value) => MolarMass.FromHectogramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass KilogramsPerMole(this T value) => MolarMass.FromKilogramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass KilopoundsPerMole(this T value) => MolarMass.FromKilopoundsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass MegapoundsPerMole(this T value) => MolarMass.FromMegapoundsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass MicrogramsPerMole(this T value) => MolarMass.FromMicrogramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass MilligramsPerMole(this T value) => MolarMass.FromMilligramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass NanogramsPerMole(this T value) => MolarMass.FromNanogramsPerMole(Convert.ToDouble(value)); - - /// - public static MolarMass PoundsPerMole(this T value) => MolarMass.FromPoundsPerMole(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarityExtensions.g.cs deleted file mode 100644 index 1ac5579802..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToMolarityExtensions.g.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToMolarity -{ - public static class NumberToMolarityExtensions - { - /// - public static Molarity CentimolesPerLiter(this T value) => Molarity.FromCentimolesPerLiter(Convert.ToDouble(value)); - - /// - public static Molarity DecimolesPerLiter(this T value) => Molarity.FromDecimolesPerLiter(Convert.ToDouble(value)); - - /// - public static Molarity MicromolesPerLiter(this T value) => Molarity.FromMicromolesPerLiter(Convert.ToDouble(value)); - - /// - public static Molarity MillimolesPerLiter(this T value) => Molarity.FromMillimolesPerLiter(Convert.ToDouble(value)); - - /// - public static Molarity MolesPerCubicMeter(this T value) => Molarity.FromMolesPerCubicMeter(Convert.ToDouble(value)); - - /// - public static Molarity MolesPerLiter(this T value) => Molarity.FromMolesPerLiter(Convert.ToDouble(value)); - - /// - public static Molarity NanomolesPerLiter(this T value) => Molarity.FromNanomolesPerLiter(Convert.ToDouble(value)); - - /// - public static Molarity PicomolesPerLiter(this T value) => Molarity.FromPicomolesPerLiter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPermeabilityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPermeabilityExtensions.g.cs deleted file mode 100644 index 823d428c34..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPermeabilityExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToPermeability -{ - public static class NumberToPermeabilityExtensions - { - /// - public static Permeability HenriesPerMeter(this T value) => Permeability.FromHenriesPerMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPermittivityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPermittivityExtensions.g.cs deleted file mode 100644 index 647088a5c1..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPermittivityExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToPermittivity -{ - public static class NumberToPermittivityExtensions - { - /// - public static Permittivity FaradsPerMeter(this T value) => Permittivity.FromFaradsPerMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerDensityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerDensityExtensions.g.cs deleted file mode 100644 index e6ed64ac9f..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerDensityExtensions.g.cs +++ /dev/null @@ -1,181 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToPowerDensity -{ - public static class NumberToPowerDensityExtensions - { - /// - public static PowerDensity DecawattsPerCubicFoot(this T value) => PowerDensity.FromDecawattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity DecawattsPerCubicInch(this T value) => PowerDensity.FromDecawattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity DecawattsPerCubicMeter(this T value) => PowerDensity.FromDecawattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity DecawattsPerLiter(this T value) => PowerDensity.FromDecawattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity DeciwattsPerCubicFoot(this T value) => PowerDensity.FromDeciwattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity DeciwattsPerCubicInch(this T value) => PowerDensity.FromDeciwattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity DeciwattsPerCubicMeter(this T value) => PowerDensity.FromDeciwattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity DeciwattsPerLiter(this T value) => PowerDensity.FromDeciwattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity GigawattsPerCubicFoot(this T value) => PowerDensity.FromGigawattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity GigawattsPerCubicInch(this T value) => PowerDensity.FromGigawattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity GigawattsPerCubicMeter(this T value) => PowerDensity.FromGigawattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity GigawattsPerLiter(this T value) => PowerDensity.FromGigawattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity KilowattsPerCubicFoot(this T value) => PowerDensity.FromKilowattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity KilowattsPerCubicInch(this T value) => PowerDensity.FromKilowattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity KilowattsPerCubicMeter(this T value) => PowerDensity.FromKilowattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity KilowattsPerLiter(this T value) => PowerDensity.FromKilowattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity MegawattsPerCubicFoot(this T value) => PowerDensity.FromMegawattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity MegawattsPerCubicInch(this T value) => PowerDensity.FromMegawattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity MegawattsPerCubicMeter(this T value) => PowerDensity.FromMegawattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity MegawattsPerLiter(this T value) => PowerDensity.FromMegawattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity MicrowattsPerCubicFoot(this T value) => PowerDensity.FromMicrowattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity MicrowattsPerCubicInch(this T value) => PowerDensity.FromMicrowattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity MicrowattsPerCubicMeter(this T value) => PowerDensity.FromMicrowattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity MicrowattsPerLiter(this T value) => PowerDensity.FromMicrowattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity MilliwattsPerCubicFoot(this T value) => PowerDensity.FromMilliwattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity MilliwattsPerCubicInch(this T value) => PowerDensity.FromMilliwattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity MilliwattsPerCubicMeter(this T value) => PowerDensity.FromMilliwattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity MilliwattsPerLiter(this T value) => PowerDensity.FromMilliwattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity NanowattsPerCubicFoot(this T value) => PowerDensity.FromNanowattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity NanowattsPerCubicInch(this T value) => PowerDensity.FromNanowattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity NanowattsPerCubicMeter(this T value) => PowerDensity.FromNanowattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity NanowattsPerLiter(this T value) => PowerDensity.FromNanowattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity PicowattsPerCubicFoot(this T value) => PowerDensity.FromPicowattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity PicowattsPerCubicInch(this T value) => PowerDensity.FromPicowattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity PicowattsPerCubicMeter(this T value) => PowerDensity.FromPicowattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity PicowattsPerLiter(this T value) => PowerDensity.FromPicowattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity TerawattsPerCubicFoot(this T value) => PowerDensity.FromTerawattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity TerawattsPerCubicInch(this T value) => PowerDensity.FromTerawattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity TerawattsPerCubicMeter(this T value) => PowerDensity.FromTerawattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity TerawattsPerLiter(this T value) => PowerDensity.FromTerawattsPerLiter(Convert.ToDouble(value)); - - /// - public static PowerDensity WattsPerCubicFoot(this T value) => PowerDensity.FromWattsPerCubicFoot(Convert.ToDouble(value)); - - /// - public static PowerDensity WattsPerCubicInch(this T value) => PowerDensity.FromWattsPerCubicInch(Convert.ToDouble(value)); - - /// - public static PowerDensity WattsPerCubicMeter(this T value) => PowerDensity.FromWattsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static PowerDensity WattsPerLiter(this T value) => PowerDensity.FromWattsPerLiter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerExtensions.g.cs deleted file mode 100644 index 9de02cb592..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerExtensions.g.cs +++ /dev/null @@ -1,109 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToPower -{ - public static class NumberToPowerExtensions - { - /// - public static Power BoilerHorsepower(this T value) => Power.FromBoilerHorsepower(Convert.ToDouble(value)); - - /// - public static Power BritishThermalUnitsPerHour(this T value) => Power.FromBritishThermalUnitsPerHour(Convert.ToDouble(value)); - - /// - public static Power Decawatts(this T value) => Power.FromDecawatts(Convert.ToDouble(value)); - - /// - public static Power Deciwatts(this T value) => Power.FromDeciwatts(Convert.ToDouble(value)); - - /// - public static Power ElectricalHorsepower(this T value) => Power.FromElectricalHorsepower(Convert.ToDouble(value)); - - /// - public static Power Femtowatts(this T value) => Power.FromFemtowatts(Convert.ToDouble(value)); - - /// - public static Power Gigawatts(this T value) => Power.FromGigawatts(Convert.ToDouble(value)); - - /// - public static Power HydraulicHorsepower(this T value) => Power.FromHydraulicHorsepower(Convert.ToDouble(value)); - - /// - public static Power KilobritishThermalUnitsPerHour(this T value) => Power.FromKilobritishThermalUnitsPerHour(Convert.ToDouble(value)); - - /// - public static Power Kilowatts(this T value) => Power.FromKilowatts(Convert.ToDouble(value)); - - /// - public static Power MechanicalHorsepower(this T value) => Power.FromMechanicalHorsepower(Convert.ToDouble(value)); - - /// - public static Power Megawatts(this T value) => Power.FromMegawatts(Convert.ToDouble(value)); - - /// - public static Power MetricHorsepower(this T value) => Power.FromMetricHorsepower(Convert.ToDouble(value)); - - /// - public static Power Microwatts(this T value) => Power.FromMicrowatts(Convert.ToDouble(value)); - - /// - public static Power Milliwatts(this T value) => Power.FromMilliwatts(Convert.ToDouble(value)); - - /// - public static Power Nanowatts(this T value) => Power.FromNanowatts(Convert.ToDouble(value)); - - /// - public static Power Petawatts(this T value) => Power.FromPetawatts(Convert.ToDouble(value)); - - /// - public static Power Picowatts(this T value) => Power.FromPicowatts(Convert.ToDouble(value)); - - /// - public static Power Terawatts(this T value) => Power.FromTerawatts(Convert.ToDouble(value)); - - /// - public static Power Watts(this T value) => Power.FromWatts(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerRatioExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerRatioExtensions.g.cs deleted file mode 100644 index 996e47fbd5..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPowerRatioExtensions.g.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToPowerRatio -{ - public static class NumberToPowerRatioExtensions - { - /// - public static PowerRatio DecibelMilliwatts(this T value) => PowerRatio.FromDecibelMilliwatts(Convert.ToDouble(value)); - - /// - public static PowerRatio DecibelWatts(this T value) => PowerRatio.FromDecibelWatts(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPressureChangeRateExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPressureChangeRateExtensions.g.cs deleted file mode 100644 index 380cdb9cce..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPressureChangeRateExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToPressureChangeRate -{ - public static class NumberToPressureChangeRateExtensions - { - /// - public static PressureChangeRate AtmospheresPerSecond(this T value) => PressureChangeRate.FromAtmospheresPerSecond(Convert.ToDouble(value)); - - /// - public static PressureChangeRate KilopascalsPerSecond(this T value) => PressureChangeRate.FromKilopascalsPerSecond(Convert.ToDouble(value)); - - /// - public static PressureChangeRate MegapascalsPerSecond(this T value) => PressureChangeRate.FromMegapascalsPerSecond(Convert.ToDouble(value)); - - /// - public static PressureChangeRate PascalsPerSecond(this T value) => PressureChangeRate.FromPascalsPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPressureExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToPressureExtensions.g.cs deleted file mode 100644 index 04fb82fb35..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToPressureExtensions.g.cs +++ /dev/null @@ -1,160 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToPressure -{ - public static class NumberToPressureExtensions - { - /// - public static Pressure Atmospheres(this T value) => Pressure.FromAtmospheres(Convert.ToDouble(value)); - - /// - public static Pressure Bars(this T value) => Pressure.FromBars(Convert.ToDouble(value)); - - /// - public static Pressure Centibars(this T value) => Pressure.FromCentibars(Convert.ToDouble(value)); - - /// - public static Pressure Decapascals(this T value) => Pressure.FromDecapascals(Convert.ToDouble(value)); - - /// - public static Pressure Decibars(this T value) => Pressure.FromDecibars(Convert.ToDouble(value)); - - /// - public static Pressure FeetOfHead(this T value) => Pressure.FromFeetOfHead(Convert.ToDouble(value)); - - /// - public static Pressure Gigapascals(this T value) => Pressure.FromGigapascals(Convert.ToDouble(value)); - - /// - public static Pressure Hectopascals(this T value) => Pressure.FromHectopascals(Convert.ToDouble(value)); - - /// - public static Pressure InchesOfMercury(this T value) => Pressure.FromInchesOfMercury(Convert.ToDouble(value)); - - /// - public static Pressure Kilobars(this T value) => Pressure.FromKilobars(Convert.ToDouble(value)); - - /// - public static Pressure KilogramsForcePerSquareCentimeter(this T value) => Pressure.FromKilogramsForcePerSquareCentimeter(Convert.ToDouble(value)); - - /// - public static Pressure KilogramsForcePerSquareMeter(this T value) => Pressure.FromKilogramsForcePerSquareMeter(Convert.ToDouble(value)); - - /// - public static Pressure KilogramsForcePerSquareMillimeter(this T value) => Pressure.FromKilogramsForcePerSquareMillimeter(Convert.ToDouble(value)); - - /// - public static Pressure KilonewtonsPerSquareCentimeter(this T value) => Pressure.FromKilonewtonsPerSquareCentimeter(Convert.ToDouble(value)); - - /// - public static Pressure KilonewtonsPerSquareMeter(this T value) => Pressure.FromKilonewtonsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static Pressure KilonewtonsPerSquareMillimeter(this T value) => Pressure.FromKilonewtonsPerSquareMillimeter(Convert.ToDouble(value)); - - /// - public static Pressure Kilopascals(this T value) => Pressure.FromKilopascals(Convert.ToDouble(value)); - - /// - public static Pressure KilopoundsForcePerSquareFoot(this T value) => Pressure.FromKilopoundsForcePerSquareFoot(Convert.ToDouble(value)); - - /// - public static Pressure KilopoundsForcePerSquareInch(this T value) => Pressure.FromKilopoundsForcePerSquareInch(Convert.ToDouble(value)); - - /// - public static Pressure Megabars(this T value) => Pressure.FromMegabars(Convert.ToDouble(value)); - - /// - public static Pressure MeganewtonsPerSquareMeter(this T value) => Pressure.FromMeganewtonsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static Pressure Megapascals(this T value) => Pressure.FromMegapascals(Convert.ToDouble(value)); - - /// - public static Pressure MetersOfHead(this T value) => Pressure.FromMetersOfHead(Convert.ToDouble(value)); - - /// - public static Pressure Micropascals(this T value) => Pressure.FromMicropascals(Convert.ToDouble(value)); - - /// - public static Pressure Millibars(this T value) => Pressure.FromMillibars(Convert.ToDouble(value)); - - /// - public static Pressure MillimetersOfMercury(this T value) => Pressure.FromMillimetersOfMercury(Convert.ToDouble(value)); - - /// - public static Pressure NewtonsPerSquareCentimeter(this T value) => Pressure.FromNewtonsPerSquareCentimeter(Convert.ToDouble(value)); - - /// - public static Pressure NewtonsPerSquareMeter(this T value) => Pressure.FromNewtonsPerSquareMeter(Convert.ToDouble(value)); - - /// - public static Pressure NewtonsPerSquareMillimeter(this T value) => Pressure.FromNewtonsPerSquareMillimeter(Convert.ToDouble(value)); - - /// - public static Pressure Pascals(this T value) => Pressure.FromPascals(Convert.ToDouble(value)); - - /// - public static Pressure PoundsForcePerSquareFoot(this T value) => Pressure.FromPoundsForcePerSquareFoot(Convert.ToDouble(value)); - - /// - public static Pressure PoundsForcePerSquareInch(this T value) => Pressure.FromPoundsForcePerSquareInch(Convert.ToDouble(value)); - - /// - public static Pressure TechnicalAtmospheres(this T value) => Pressure.FromTechnicalAtmospheres(Convert.ToDouble(value)); - - /// - public static Pressure TonnesForcePerSquareCentimeter(this T value) => Pressure.FromTonnesForcePerSquareCentimeter(Convert.ToDouble(value)); - - /// - public static Pressure TonnesForcePerSquareMeter(this T value) => Pressure.FromTonnesForcePerSquareMeter(Convert.ToDouble(value)); - - /// - public static Pressure TonnesForcePerSquareMillimeter(this T value) => Pressure.FromTonnesForcePerSquareMillimeter(Convert.ToDouble(value)); - - /// - public static Pressure Torrs(this T value) => Pressure.FromTorrs(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRatioExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToRatioExtensions.g.cs deleted file mode 100644 index 5d33244679..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRatioExtensions.g.cs +++ /dev/null @@ -1,67 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToRatio -{ - public static class NumberToRatioExtensions - { - /// - public static Ratio DecimalFractions(this T value) => Ratio.FromDecimalFractions(Convert.ToDouble(value)); - - /// - public static Ratio PartsPerBillion(this T value) => Ratio.FromPartsPerBillion(Convert.ToDouble(value)); - - /// - public static Ratio PartsPerMillion(this T value) => Ratio.FromPartsPerMillion(Convert.ToDouble(value)); - - /// - public static Ratio PartsPerThousand(this T value) => Ratio.FromPartsPerThousand(Convert.ToDouble(value)); - - /// - public static Ratio PartsPerTrillion(this T value) => Ratio.FromPartsPerTrillion(Convert.ToDouble(value)); - - /// - public static Ratio Percent(this T value) => Ratio.FromPercent(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToReactiveEnergyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToReactiveEnergyExtensions.g.cs deleted file mode 100644 index 9154910452..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToReactiveEnergyExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToReactiveEnergy -{ - public static class NumberToReactiveEnergyExtensions - { - /// - public static ReactiveEnergy KilovoltampereReactiveHours(this T value) => ReactiveEnergy.FromKilovoltampereReactiveHours(Convert.ToDouble(value)); - - /// - public static ReactiveEnergy MegavoltampereReactiveHours(this T value) => ReactiveEnergy.FromMegavoltampereReactiveHours(Convert.ToDouble(value)); - - /// - public static ReactiveEnergy VoltampereReactiveHours(this T value) => ReactiveEnergy.FromVoltampereReactiveHours(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToReactivePowerExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToReactivePowerExtensions.g.cs deleted file mode 100644 index efb9839777..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToReactivePowerExtensions.g.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToReactivePower -{ - public static class NumberToReactivePowerExtensions - { - /// - public static ReactivePower GigavoltamperesReactive(this T value) => ReactivePower.FromGigavoltamperesReactive(Convert.ToDouble(value)); - - /// - public static ReactivePower KilovoltamperesReactive(this T value) => ReactivePower.FromKilovoltamperesReactive(Convert.ToDouble(value)); - - /// - public static ReactivePower MegavoltamperesReactive(this T value) => ReactivePower.FromMegavoltamperesReactive(Convert.ToDouble(value)); - - /// - public static ReactivePower VoltamperesReactive(this T value) => ReactivePower.FromVoltamperesReactive(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalAccelerationExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalAccelerationExtensions.g.cs deleted file mode 100644 index d8643581a7..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalAccelerationExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToRotationalAcceleration -{ - public static class NumberToRotationalAccelerationExtensions - { - /// - public static RotationalAcceleration DegreesPerSecondSquared(this T value) => RotationalAcceleration.FromDegreesPerSecondSquared(Convert.ToDouble(value)); - - /// - public static RotationalAcceleration RadiansPerSecondSquared(this T value) => RotationalAcceleration.FromRadiansPerSecondSquared(Convert.ToDouble(value)); - - /// - public static RotationalAcceleration RevolutionsPerMinutePerSecond(this T value) => RotationalAcceleration.FromRevolutionsPerMinutePerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalSpeedExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalSpeedExtensions.g.cs deleted file mode 100644 index 005f9ab145..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalSpeedExtensions.g.cs +++ /dev/null @@ -1,88 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToRotationalSpeed -{ - public static class NumberToRotationalSpeedExtensions - { - /// - public static RotationalSpeed CentiradiansPerSecond(this T value) => RotationalSpeed.FromCentiradiansPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed DeciradiansPerSecond(this T value) => RotationalSpeed.FromDeciradiansPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed DegreesPerMinute(this T value) => RotationalSpeed.FromDegreesPerMinute(Convert.ToDouble(value)); - - /// - public static RotationalSpeed DegreesPerSecond(this T value) => RotationalSpeed.FromDegreesPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed MicrodegreesPerSecond(this T value) => RotationalSpeed.FromMicrodegreesPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed MicroradiansPerSecond(this T value) => RotationalSpeed.FromMicroradiansPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed MillidegreesPerSecond(this T value) => RotationalSpeed.FromMillidegreesPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed MilliradiansPerSecond(this T value) => RotationalSpeed.FromMilliradiansPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed NanodegreesPerSecond(this T value) => RotationalSpeed.FromNanodegreesPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed NanoradiansPerSecond(this T value) => RotationalSpeed.FromNanoradiansPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed RadiansPerSecond(this T value) => RotationalSpeed.FromRadiansPerSecond(Convert.ToDouble(value)); - - /// - public static RotationalSpeed RevolutionsPerMinute(this T value) => RotationalSpeed.FromRevolutionsPerMinute(Convert.ToDouble(value)); - - /// - public static RotationalSpeed RevolutionsPerSecond(this T value) => RotationalSpeed.FromRevolutionsPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalStiffnessExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalStiffnessExtensions.g.cs deleted file mode 100644 index 36e2e3d4ab..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalStiffnessExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToRotationalStiffness -{ - public static class NumberToRotationalStiffnessExtensions - { - /// - public static RotationalStiffness KilonewtonMetersPerRadian(this T value) => RotationalStiffness.FromKilonewtonMetersPerRadian(Convert.ToDouble(value)); - - /// - public static RotationalStiffness MeganewtonMetersPerRadian(this T value) => RotationalStiffness.FromMeganewtonMetersPerRadian(Convert.ToDouble(value)); - - /// - public static RotationalStiffness NewtonMetersPerRadian(this T value) => RotationalStiffness.FromNewtonMetersPerRadian(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalStiffnessPerLengthExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalStiffnessPerLengthExtensions.g.cs deleted file mode 100644 index 972c49dac1..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToRotationalStiffnessPerLengthExtensions.g.cs +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToRotationalStiffnessPerLength -{ - public static class NumberToRotationalStiffnessPerLengthExtensions - { - /// - public static RotationalStiffnessPerLength KilonewtonMetersPerRadianPerMeter(this T value) => RotationalStiffnessPerLength.FromKilonewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); - - /// - public static RotationalStiffnessPerLength MeganewtonMetersPerRadianPerMeter(this T value) => RotationalStiffnessPerLength.FromMeganewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); - - /// - public static RotationalStiffnessPerLength NewtonMetersPerRadianPerMeter(this T value) => RotationalStiffnessPerLength.FromNewtonMetersPerRadianPerMeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSolidAngleExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToSolidAngleExtensions.g.cs deleted file mode 100644 index ee15ab2fcf..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSolidAngleExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToSolidAngle -{ - public static class NumberToSolidAngleExtensions - { - /// - public static SolidAngle Steradians(this T value) => SolidAngle.FromSteradians(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificEnergyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificEnergyExtensions.g.cs deleted file mode 100644 index eedb73e55d..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificEnergyExtensions.g.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToSpecificEnergy -{ - public static class NumberToSpecificEnergyExtensions - { - /// - public static SpecificEnergy CaloriesPerGram(this T value) => SpecificEnergy.FromCaloriesPerGram(Convert.ToDouble(value)); - - /// - public static SpecificEnergy JoulesPerKilogram(this T value) => SpecificEnergy.FromJoulesPerKilogram(Convert.ToDouble(value)); - - /// - public static SpecificEnergy KilocaloriesPerGram(this T value) => SpecificEnergy.FromKilocaloriesPerGram(Convert.ToDouble(value)); - - /// - public static SpecificEnergy KilojoulesPerKilogram(this T value) => SpecificEnergy.FromKilojoulesPerKilogram(Convert.ToDouble(value)); - - /// - public static SpecificEnergy KilowattHoursPerKilogram(this T value) => SpecificEnergy.FromKilowattHoursPerKilogram(Convert.ToDouble(value)); - - /// - public static SpecificEnergy MegajoulesPerKilogram(this T value) => SpecificEnergy.FromMegajoulesPerKilogram(Convert.ToDouble(value)); - - /// - public static SpecificEnergy MegawattHoursPerKilogram(this T value) => SpecificEnergy.FromMegawattHoursPerKilogram(Convert.ToDouble(value)); - - /// - public static SpecificEnergy WattHoursPerKilogram(this T value) => SpecificEnergy.FromWattHoursPerKilogram(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificEntropyExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificEntropyExtensions.g.cs deleted file mode 100644 index 349c77f35b..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificEntropyExtensions.g.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToSpecificEntropy -{ - public static class NumberToSpecificEntropyExtensions - { - /// - public static SpecificEntropy CaloriesPerGramKelvin(this T value) => SpecificEntropy.FromCaloriesPerGramKelvin(Convert.ToDouble(value)); - - /// - public static SpecificEntropy JoulesPerKilogramDegreeCelsius(this T value) => SpecificEntropy.FromJoulesPerKilogramDegreeCelsius(Convert.ToDouble(value)); - - /// - public static SpecificEntropy JoulesPerKilogramKelvin(this T value) => SpecificEntropy.FromJoulesPerKilogramKelvin(Convert.ToDouble(value)); - - /// - public static SpecificEntropy KilocaloriesPerGramKelvin(this T value) => SpecificEntropy.FromKilocaloriesPerGramKelvin(Convert.ToDouble(value)); - - /// - public static SpecificEntropy KilojoulesPerKilogramDegreeCelsius(this T value) => SpecificEntropy.FromKilojoulesPerKilogramDegreeCelsius(Convert.ToDouble(value)); - - /// - public static SpecificEntropy KilojoulesPerKilogramKelvin(this T value) => SpecificEntropy.FromKilojoulesPerKilogramKelvin(Convert.ToDouble(value)); - - /// - public static SpecificEntropy MegajoulesPerKilogramDegreeCelsius(this T value) => SpecificEntropy.FromMegajoulesPerKilogramDegreeCelsius(Convert.ToDouble(value)); - - /// - public static SpecificEntropy MegajoulesPerKilogramKelvin(this T value) => SpecificEntropy.FromMegajoulesPerKilogramKelvin(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificVolumeExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificVolumeExtensions.g.cs deleted file mode 100644 index 38ad063b86..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificVolumeExtensions.g.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToSpecificVolume -{ - public static class NumberToSpecificVolumeExtensions - { - /// - public static SpecificVolume CubicFeetPerPound(this T value) => SpecificVolume.FromCubicFeetPerPound(Convert.ToDouble(value)); - - /// - public static SpecificVolume CubicMetersPerKilogram(this T value) => SpecificVolume.FromCubicMetersPerKilogram(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificWeightExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificWeightExtensions.g.cs deleted file mode 100644 index 53e1155bd6..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpecificWeightExtensions.g.cs +++ /dev/null @@ -1,100 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToSpecificWeight -{ - public static class NumberToSpecificWeightExtensions - { - /// - public static SpecificWeight KilogramsForcePerCubicCentimeter(this T value) => SpecificWeight.FromKilogramsForcePerCubicCentimeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight KilogramsForcePerCubicMeter(this T value) => SpecificWeight.FromKilogramsForcePerCubicMeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight KilogramsForcePerCubicMillimeter(this T value) => SpecificWeight.FromKilogramsForcePerCubicMillimeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight KilonewtonsPerCubicCentimeter(this T value) => SpecificWeight.FromKilonewtonsPerCubicCentimeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight KilonewtonsPerCubicMeter(this T value) => SpecificWeight.FromKilonewtonsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight KilonewtonsPerCubicMillimeter(this T value) => SpecificWeight.FromKilonewtonsPerCubicMillimeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight KilopoundsForcePerCubicFoot(this T value) => SpecificWeight.FromKilopoundsForcePerCubicFoot(Convert.ToDouble(value)); - - /// - public static SpecificWeight KilopoundsForcePerCubicInch(this T value) => SpecificWeight.FromKilopoundsForcePerCubicInch(Convert.ToDouble(value)); - - /// - public static SpecificWeight MeganewtonsPerCubicMeter(this T value) => SpecificWeight.FromMeganewtonsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight NewtonsPerCubicCentimeter(this T value) => SpecificWeight.FromNewtonsPerCubicCentimeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight NewtonsPerCubicMeter(this T value) => SpecificWeight.FromNewtonsPerCubicMeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight NewtonsPerCubicMillimeter(this T value) => SpecificWeight.FromNewtonsPerCubicMillimeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight PoundsForcePerCubicFoot(this T value) => SpecificWeight.FromPoundsForcePerCubicFoot(Convert.ToDouble(value)); - - /// - public static SpecificWeight PoundsForcePerCubicInch(this T value) => SpecificWeight.FromPoundsForcePerCubicInch(Convert.ToDouble(value)); - - /// - public static SpecificWeight TonnesForcePerCubicCentimeter(this T value) => SpecificWeight.FromTonnesForcePerCubicCentimeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight TonnesForcePerCubicMeter(this T value) => SpecificWeight.FromTonnesForcePerCubicMeter(Convert.ToDouble(value)); - - /// - public static SpecificWeight TonnesForcePerCubicMillimeter(this T value) => SpecificWeight.FromTonnesForcePerCubicMillimeter(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpeedExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpeedExtensions.g.cs deleted file mode 100644 index d921f92ff2..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToSpeedExtensions.g.cs +++ /dev/null @@ -1,145 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToSpeed -{ - public static class NumberToSpeedExtensions - { - /// - public static Speed CentimetersPerHour(this T value) => Speed.FromCentimetersPerHour(Convert.ToDouble(value)); - - /// - public static Speed CentimetersPerMinutes(this T value) => Speed.FromCentimetersPerMinutes(Convert.ToDouble(value)); - - /// - public static Speed CentimetersPerSecond(this T value) => Speed.FromCentimetersPerSecond(Convert.ToDouble(value)); - - /// - public static Speed DecimetersPerMinutes(this T value) => Speed.FromDecimetersPerMinutes(Convert.ToDouble(value)); - - /// - public static Speed DecimetersPerSecond(this T value) => Speed.FromDecimetersPerSecond(Convert.ToDouble(value)); - - /// - public static Speed FeetPerHour(this T value) => Speed.FromFeetPerHour(Convert.ToDouble(value)); - - /// - public static Speed FeetPerMinute(this T value) => Speed.FromFeetPerMinute(Convert.ToDouble(value)); - - /// - public static Speed FeetPerSecond(this T value) => Speed.FromFeetPerSecond(Convert.ToDouble(value)); - - /// - public static Speed InchesPerHour(this T value) => Speed.FromInchesPerHour(Convert.ToDouble(value)); - - /// - public static Speed InchesPerMinute(this T value) => Speed.FromInchesPerMinute(Convert.ToDouble(value)); - - /// - public static Speed InchesPerSecond(this T value) => Speed.FromInchesPerSecond(Convert.ToDouble(value)); - - /// - public static Speed KilometersPerHour(this T value) => Speed.FromKilometersPerHour(Convert.ToDouble(value)); - - /// - public static Speed KilometersPerMinutes(this T value) => Speed.FromKilometersPerMinutes(Convert.ToDouble(value)); - - /// - public static Speed KilometersPerSecond(this T value) => Speed.FromKilometersPerSecond(Convert.ToDouble(value)); - - /// - public static Speed Knots(this T value) => Speed.FromKnots(Convert.ToDouble(value)); - - /// - public static Speed MetersPerHour(this T value) => Speed.FromMetersPerHour(Convert.ToDouble(value)); - - /// - public static Speed MetersPerMinutes(this T value) => Speed.FromMetersPerMinutes(Convert.ToDouble(value)); - - /// - public static Speed MetersPerSecond(this T value) => Speed.FromMetersPerSecond(Convert.ToDouble(value)); - - /// - public static Speed MicrometersPerMinutes(this T value) => Speed.FromMicrometersPerMinutes(Convert.ToDouble(value)); - - /// - public static Speed MicrometersPerSecond(this T value) => Speed.FromMicrometersPerSecond(Convert.ToDouble(value)); - - /// - public static Speed MilesPerHour(this T value) => Speed.FromMilesPerHour(Convert.ToDouble(value)); - - /// - public static Speed MillimetersPerHour(this T value) => Speed.FromMillimetersPerHour(Convert.ToDouble(value)); - - /// - public static Speed MillimetersPerMinutes(this T value) => Speed.FromMillimetersPerMinutes(Convert.ToDouble(value)); - - /// - public static Speed MillimetersPerSecond(this T value) => Speed.FromMillimetersPerSecond(Convert.ToDouble(value)); - - /// - public static Speed NanometersPerMinutes(this T value) => Speed.FromNanometersPerMinutes(Convert.ToDouble(value)); - - /// - public static Speed NanometersPerSecond(this T value) => Speed.FromNanometersPerSecond(Convert.ToDouble(value)); - - /// - public static Speed UsSurveyFeetPerHour(this T value) => Speed.FromUsSurveyFeetPerHour(Convert.ToDouble(value)); - - /// - public static Speed UsSurveyFeetPerMinute(this T value) => Speed.FromUsSurveyFeetPerMinute(Convert.ToDouble(value)); - - /// - public static Speed UsSurveyFeetPerSecond(this T value) => Speed.FromUsSurveyFeetPerSecond(Convert.ToDouble(value)); - - /// - public static Speed YardsPerHour(this T value) => Speed.FromYardsPerHour(Convert.ToDouble(value)); - - /// - public static Speed YardsPerMinute(this T value) => Speed.FromYardsPerMinute(Convert.ToDouble(value)); - - /// - public static Speed YardsPerSecond(this T value) => Speed.FromYardsPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureChangeRateExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureChangeRateExtensions.g.cs deleted file mode 100644 index 6754a82323..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureChangeRateExtensions.g.cs +++ /dev/null @@ -1,79 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToTemperatureChangeRate -{ - public static class NumberToTemperatureChangeRateExtensions - { - /// - public static TemperatureChangeRate CentidegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromCentidegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate DecadegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromDecadegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate DecidegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromDecidegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate DegreesCelsiusPerMinute(this T value) => TemperatureChangeRate.FromDegreesCelsiusPerMinute(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate DegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromDegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate HectodegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromHectodegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate KilodegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromKilodegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate MicrodegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromMicrodegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate MillidegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromMillidegreesCelsiusPerSecond(Convert.ToDouble(value)); - - /// - public static TemperatureChangeRate NanodegreesCelsiusPerSecond(this T value) => TemperatureChangeRate.FromNanodegreesCelsiusPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureDeltaExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureDeltaExtensions.g.cs deleted file mode 100644 index d1a62f286e..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureDeltaExtensions.g.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToTemperatureDelta -{ - public static class NumberToTemperatureDeltaExtensions - { - /// - public static TemperatureDelta DegreesCelsius(this T value) => TemperatureDelta.FromDegreesCelsius(Convert.ToDouble(value)); - - /// - public static TemperatureDelta DegreesDelisle(this T value) => TemperatureDelta.FromDegreesDelisle(Convert.ToDouble(value)); - - /// - public static TemperatureDelta DegreesFahrenheit(this T value) => TemperatureDelta.FromDegreesFahrenheit(Convert.ToDouble(value)); - - /// - public static TemperatureDelta DegreesNewton(this T value) => TemperatureDelta.FromDegreesNewton(Convert.ToDouble(value)); - - /// - public static TemperatureDelta DegreesRankine(this T value) => TemperatureDelta.FromDegreesRankine(Convert.ToDouble(value)); - - /// - public static TemperatureDelta DegreesReaumur(this T value) => TemperatureDelta.FromDegreesReaumur(Convert.ToDouble(value)); - - /// - public static TemperatureDelta DegreesRoemer(this T value) => TemperatureDelta.FromDegreesRoemer(Convert.ToDouble(value)); - - /// - public static TemperatureDelta Kelvins(this T value) => TemperatureDelta.FromKelvins(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureExtensions.g.cs deleted file mode 100644 index b04a374531..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTemperatureExtensions.g.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToTemperature -{ - public static class NumberToTemperatureExtensions - { - /// - public static Temperature DegreesCelsius(this T value) => Temperature.FromDegreesCelsius(Convert.ToDouble(value)); - - /// - public static Temperature DegreesDelisle(this T value) => Temperature.FromDegreesDelisle(Convert.ToDouble(value)); - - /// - public static Temperature DegreesFahrenheit(this T value) => Temperature.FromDegreesFahrenheit(Convert.ToDouble(value)); - - /// - public static Temperature DegreesNewton(this T value) => Temperature.FromDegreesNewton(Convert.ToDouble(value)); - - /// - public static Temperature DegreesRankine(this T value) => Temperature.FromDegreesRankine(Convert.ToDouble(value)); - - /// - public static Temperature DegreesReaumur(this T value) => Temperature.FromDegreesReaumur(Convert.ToDouble(value)); - - /// - public static Temperature DegreesRoemer(this T value) => Temperature.FromDegreesRoemer(Convert.ToDouble(value)); - - /// - public static Temperature Kelvins(this T value) => Temperature.FromKelvins(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToThermalConductivityExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToThermalConductivityExtensions.g.cs deleted file mode 100644 index 74d3658cb4..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToThermalConductivityExtensions.g.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToThermalConductivity -{ - public static class NumberToThermalConductivityExtensions - { - /// - public static ThermalConductivity BtusPerHourFootFahrenheit(this T value) => ThermalConductivity.FromBtusPerHourFootFahrenheit(Convert.ToDouble(value)); - - /// - public static ThermalConductivity WattsPerMeterKelvin(this T value) => ThermalConductivity.FromWattsPerMeterKelvin(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToThermalResistanceExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToThermalResistanceExtensions.g.cs deleted file mode 100644 index 814e163654..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToThermalResistanceExtensions.g.cs +++ /dev/null @@ -1,64 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToThermalResistance -{ - public static class NumberToThermalResistanceExtensions - { - /// - public static ThermalResistance HourSquareFeetDegreesFahrenheitPerBtu(this T value) => ThermalResistance.FromHourSquareFeetDegreesFahrenheitPerBtu(Convert.ToDouble(value)); - - /// - public static ThermalResistance SquareCentimeterHourDegreesCelsiusPerKilocalorie(this T value) => ThermalResistance.FromSquareCentimeterHourDegreesCelsiusPerKilocalorie(Convert.ToDouble(value)); - - /// - public static ThermalResistance SquareCentimeterKelvinsPerWatt(this T value) => ThermalResistance.FromSquareCentimeterKelvinsPerWatt(Convert.ToDouble(value)); - - /// - public static ThermalResistance SquareMeterDegreesCelsiusPerWatt(this T value) => ThermalResistance.FromSquareMeterDegreesCelsiusPerWatt(Convert.ToDouble(value)); - - /// - public static ThermalResistance SquareMeterKelvinsPerKilowatt(this T value) => ThermalResistance.FromSquareMeterKelvinsPerKilowatt(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTorqueExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToTorqueExtensions.g.cs deleted file mode 100644 index 9a1b0c92d8..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToTorqueExtensions.g.cs +++ /dev/null @@ -1,112 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToTorque -{ - public static class NumberToTorqueExtensions - { - /// - public static Torque KilogramForceCentimeters(this T value) => Torque.FromKilogramForceCentimeters(Convert.ToDouble(value)); - - /// - public static Torque KilogramForceMeters(this T value) => Torque.FromKilogramForceMeters(Convert.ToDouble(value)); - - /// - public static Torque KilogramForceMillimeters(this T value) => Torque.FromKilogramForceMillimeters(Convert.ToDouble(value)); - - /// - public static Torque KilonewtonCentimeters(this T value) => Torque.FromKilonewtonCentimeters(Convert.ToDouble(value)); - - /// - public static Torque KilonewtonMeters(this T value) => Torque.FromKilonewtonMeters(Convert.ToDouble(value)); - - /// - public static Torque KilonewtonMillimeters(this T value) => Torque.FromKilonewtonMillimeters(Convert.ToDouble(value)); - - /// - public static Torque KilopoundForceFeet(this T value) => Torque.FromKilopoundForceFeet(Convert.ToDouble(value)); - - /// - public static Torque KilopoundForceInches(this T value) => Torque.FromKilopoundForceInches(Convert.ToDouble(value)); - - /// - public static Torque MeganewtonCentimeters(this T value) => Torque.FromMeganewtonCentimeters(Convert.ToDouble(value)); - - /// - public static Torque MeganewtonMeters(this T value) => Torque.FromMeganewtonMeters(Convert.ToDouble(value)); - - /// - public static Torque MeganewtonMillimeters(this T value) => Torque.FromMeganewtonMillimeters(Convert.ToDouble(value)); - - /// - public static Torque MegapoundForceFeet(this T value) => Torque.FromMegapoundForceFeet(Convert.ToDouble(value)); - - /// - public static Torque MegapoundForceInches(this T value) => Torque.FromMegapoundForceInches(Convert.ToDouble(value)); - - /// - public static Torque NewtonCentimeters(this T value) => Torque.FromNewtonCentimeters(Convert.ToDouble(value)); - - /// - public static Torque NewtonMeters(this T value) => Torque.FromNewtonMeters(Convert.ToDouble(value)); - - /// - public static Torque NewtonMillimeters(this T value) => Torque.FromNewtonMillimeters(Convert.ToDouble(value)); - - /// - public static Torque PoundForceFeet(this T value) => Torque.FromPoundForceFeet(Convert.ToDouble(value)); - - /// - public static Torque PoundForceInches(this T value) => Torque.FromPoundForceInches(Convert.ToDouble(value)); - - /// - public static Torque TonneForceCentimeters(this T value) => Torque.FromTonneForceCentimeters(Convert.ToDouble(value)); - - /// - public static Torque TonneForceMeters(this T value) => Torque.FromTonneForceMeters(Convert.ToDouble(value)); - - /// - public static Torque TonneForceMillimeters(this T value) => Torque.FromTonneForceMillimeters(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVitaminAExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToVitaminAExtensions.g.cs deleted file mode 100644 index 79890adcb2..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVitaminAExtensions.g.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToVitaminA -{ - public static class NumberToVitaminAExtensions - { - /// - public static VitaminA InternationalUnits(this T value) => VitaminA.FromInternationalUnits(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeExtensions.g.cs deleted file mode 100644 index decaf41eba..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeExtensions.g.cs +++ /dev/null @@ -1,175 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToVolume -{ - public static class NumberToVolumeExtensions - { - /// - public static Volume AuTablespoons(this T value) => Volume.FromAuTablespoons(Convert.ToDouble(value)); - - /// - public static Volume Centiliters(this T value) => Volume.FromCentiliters(Convert.ToDouble(value)); - - /// - public static Volume CubicCentimeters(this T value) => Volume.FromCubicCentimeters(Convert.ToDouble(value)); - - /// - public static Volume CubicDecimeters(this T value) => Volume.FromCubicDecimeters(Convert.ToDouble(value)); - - /// - public static Volume CubicFeet(this T value) => Volume.FromCubicFeet(Convert.ToDouble(value)); - - /// - public static Volume CubicInches(this T value) => Volume.FromCubicInches(Convert.ToDouble(value)); - - /// - public static Volume CubicKilometers(this T value) => Volume.FromCubicKilometers(Convert.ToDouble(value)); - - /// - public static Volume CubicMeters(this T value) => Volume.FromCubicMeters(Convert.ToDouble(value)); - - /// - public static Volume CubicMicrometers(this T value) => Volume.FromCubicMicrometers(Convert.ToDouble(value)); - - /// - public static Volume CubicMiles(this T value) => Volume.FromCubicMiles(Convert.ToDouble(value)); - - /// - public static Volume CubicMillimeters(this T value) => Volume.FromCubicMillimeters(Convert.ToDouble(value)); - - /// - public static Volume CubicYards(this T value) => Volume.FromCubicYards(Convert.ToDouble(value)); - - /// - public static Volume Deciliters(this T value) => Volume.FromDeciliters(Convert.ToDouble(value)); - - /// - public static Volume HectocubicFeet(this T value) => Volume.FromHectocubicFeet(Convert.ToDouble(value)); - - /// - public static Volume HectocubicMeters(this T value) => Volume.FromHectocubicMeters(Convert.ToDouble(value)); - - /// - public static Volume Hectoliters(this T value) => Volume.FromHectoliters(Convert.ToDouble(value)); - - /// - public static Volume ImperialBeerBarrels(this T value) => Volume.FromImperialBeerBarrels(Convert.ToDouble(value)); - - /// - public static Volume ImperialGallons(this T value) => Volume.FromImperialGallons(Convert.ToDouble(value)); - - /// - public static Volume ImperialOunces(this T value) => Volume.FromImperialOunces(Convert.ToDouble(value)); - - /// - public static Volume KilocubicFeet(this T value) => Volume.FromKilocubicFeet(Convert.ToDouble(value)); - - /// - public static Volume KilocubicMeters(this T value) => Volume.FromKilocubicMeters(Convert.ToDouble(value)); - - /// - public static Volume KiloimperialGallons(this T value) => Volume.FromKiloimperialGallons(Convert.ToDouble(value)); - - /// - public static Volume KilousGallons(this T value) => Volume.FromKilousGallons(Convert.ToDouble(value)); - - /// - public static Volume Liters(this T value) => Volume.FromLiters(Convert.ToDouble(value)); - - /// - public static Volume MegacubicFeet(this T value) => Volume.FromMegacubicFeet(Convert.ToDouble(value)); - - /// - public static Volume MegaimperialGallons(this T value) => Volume.FromMegaimperialGallons(Convert.ToDouble(value)); - - /// - public static Volume MegausGallons(this T value) => Volume.FromMegausGallons(Convert.ToDouble(value)); - - /// - public static Volume MetricCups(this T value) => Volume.FromMetricCups(Convert.ToDouble(value)); - - /// - public static Volume MetricTeaspoons(this T value) => Volume.FromMetricTeaspoons(Convert.ToDouble(value)); - - /// - public static Volume Microliters(this T value) => Volume.FromMicroliters(Convert.ToDouble(value)); - - /// - public static Volume Milliliters(this T value) => Volume.FromMilliliters(Convert.ToDouble(value)); - - /// - public static Volume OilBarrels(this T value) => Volume.FromOilBarrels(Convert.ToDouble(value)); - - /// - public static Volume UkTablespoons(this T value) => Volume.FromUkTablespoons(Convert.ToDouble(value)); - - /// - public static Volume UsBeerBarrels(this T value) => Volume.FromUsBeerBarrels(Convert.ToDouble(value)); - - /// - public static Volume UsCustomaryCups(this T value) => Volume.FromUsCustomaryCups(Convert.ToDouble(value)); - - /// - public static Volume UsGallons(this T value) => Volume.FromUsGallons(Convert.ToDouble(value)); - - /// - public static Volume UsLegalCups(this T value) => Volume.FromUsLegalCups(Convert.ToDouble(value)); - - /// - public static Volume UsOunces(this T value) => Volume.FromUsOunces(Convert.ToDouble(value)); - - /// - public static Volume UsPints(this T value) => Volume.FromUsPints(Convert.ToDouble(value)); - - /// - public static Volume UsQuarts(this T value) => Volume.FromUsQuarts(Convert.ToDouble(value)); - - /// - public static Volume UsTablespoons(this T value) => Volume.FromUsTablespoons(Convert.ToDouble(value)); - - /// - public static Volume UsTeaspoons(this T value) => Volume.FromUsTeaspoons(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeFlowExtensions.g.cs b/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeFlowExtensions.g.cs deleted file mode 100644 index 18e5684f05..0000000000 --- a/UnitsNet/GeneratedCode/Extensions/Number/NumberToVolumeFlowExtensions.g.cs +++ /dev/null @@ -1,127 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberToVolumeFlow -{ - public static class NumberToVolumeFlowExtensions - { - /// - public static VolumeFlow CentilitersPerMinute(this T value) => VolumeFlow.FromCentilitersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicDecimetersPerMinute(this T value) => VolumeFlow.FromCubicDecimetersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicFeetPerHour(this T value) => VolumeFlow.FromCubicFeetPerHour(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicFeetPerMinute(this T value) => VolumeFlow.FromCubicFeetPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicFeetPerSecond(this T value) => VolumeFlow.FromCubicFeetPerSecond(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicMetersPerHour(this T value) => VolumeFlow.FromCubicMetersPerHour(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicMetersPerMinute(this T value) => VolumeFlow.FromCubicMetersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicMetersPerSecond(this T value) => VolumeFlow.FromCubicMetersPerSecond(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicYardsPerHour(this T value) => VolumeFlow.FromCubicYardsPerHour(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicYardsPerMinute(this T value) => VolumeFlow.FromCubicYardsPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow CubicYardsPerSecond(this T value) => VolumeFlow.FromCubicYardsPerSecond(Convert.ToDouble(value)); - - /// - public static VolumeFlow DecilitersPerMinute(this T value) => VolumeFlow.FromDecilitersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow KilolitersPerMinute(this T value) => VolumeFlow.FromKilolitersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow LitersPerHour(this T value) => VolumeFlow.FromLitersPerHour(Convert.ToDouble(value)); - - /// - public static VolumeFlow LitersPerMinute(this T value) => VolumeFlow.FromLitersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow LitersPerSecond(this T value) => VolumeFlow.FromLitersPerSecond(Convert.ToDouble(value)); - - /// - public static VolumeFlow MicrolitersPerMinute(this T value) => VolumeFlow.FromMicrolitersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow MillilitersPerMinute(this T value) => VolumeFlow.FromMillilitersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow MillionUsGallonsPerDay(this T value) => VolumeFlow.FromMillionUsGallonsPerDay(Convert.ToDouble(value)); - - /// - public static VolumeFlow NanolitersPerMinute(this T value) => VolumeFlow.FromNanolitersPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow OilBarrelsPerDay(this T value) => VolumeFlow.FromOilBarrelsPerDay(Convert.ToDouble(value)); - - /// - public static VolumeFlow OilBarrelsPerHour(this T value) => VolumeFlow.FromOilBarrelsPerHour(Convert.ToDouble(value)); - - /// - public static VolumeFlow OilBarrelsPerMinute(this T value) => VolumeFlow.FromOilBarrelsPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow UsGallonsPerHour(this T value) => VolumeFlow.FromUsGallonsPerHour(Convert.ToDouble(value)); - - /// - public static VolumeFlow UsGallonsPerMinute(this T value) => VolumeFlow.FromUsGallonsPerMinute(Convert.ToDouble(value)); - - /// - public static VolumeFlow UsGallonsPerSecond(this T value) => VolumeFlow.FromUsGallonsPerSecond(Convert.ToDouble(value)); - - } -} -#endif diff --git a/UnitsNet/Scripts/GenerateUnits.ps1 b/UnitsNet/Scripts/GenerateUnits.ps1 index f51a88ad15..3954e765bf 100644 --- a/UnitsNet/Scripts/GenerateUnits.ps1 +++ b/UnitsNet/Scripts/GenerateUnits.ps1 @@ -259,7 +259,6 @@ function Add-InheritedUnits($quantity, $quantities) { # Load external generator functions with same name as file . "$PSScriptRoot/Include-GenerateTemplates.ps1" . "$PSScriptRoot/Include-GenerateLogarithmicCode.ps1" -. "$PSScriptRoot/Include-GenerateNumberExtensionsSourceCode.ps1" . "$PSScriptRoot/Include-GenerateUnitSystemDefaultSourceCode.ps1" . "$PSScriptRoot/Include-GenerateQuantityTypeSourceCode.ps1" . "$PSScriptRoot/Include-GenerateQuantitySourceCodeCommon.ps1" @@ -295,7 +294,6 @@ foreach ($quantity in $quantities) { GenerateQuantity $quantity $quantityDir GenerateUnitType $quantity $unitEnumDir - GenerateNumberExtensions $quantity $numberExtensionsDir GenerateUnitTestBaseClass $quantity $testsDir GenerateUnitTestClassIfNotExists $quantity $testsCustomCodeDir diff --git a/UnitsNet/Scripts/Include-GenerateNumberExtensionsSourceCode.ps1 b/UnitsNet/Scripts/Include-GenerateNumberExtensionsSourceCode.ps1 deleted file mode 100644 index b571c0ee0c..0000000000 --- a/UnitsNet/Scripts/Include-GenerateNumberExtensionsSourceCode.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -function GenerateNumberExtensionsSourceCode($quantity) -{ - $quantityName = $quantity.Name; - $units = $quantity.Units; -@" -//------------------------------------------------------------------------------ -// -// This code was generated by \generate-code.bat. -// -// Changes to this file will be lost when the code is regenerated. -// The build server regenerates the code before each build and a pre-build -// step will regenerate the code on each local build. -// -// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. -// -// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. -// Add Extensions\MyQuantityExtensions.cs to decorate quantities with new behavior. -// Add UnitDefinitions\MyQuantity.json and run GeneratUnits.bat to generate new units or quantities. -// -// -//------------------------------------------------------------------------------ - -// Copyright (c) 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). -// https://github.com/angularsen/UnitsNet -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -using System; - -// Windows Runtime Component does not support extension methods and method overloads: https://msdn.microsoft.com/en-us/library/br230301.aspx -#if !WINDOWS_UWP -namespace UnitsNet.Extensions.NumberTo$quantityName -{ - public static class NumberTo$($quantityName)Extensions - { -"@; foreach ($unit in $units) { - $obsoleteAttribute = GetObsoleteAttribute($unit); - if ($obsoleteAttribute) - { - $obsoleteAttribute = "`r`n " + $obsoleteAttribute; # apply padding to conformance with code format in this page - } - - # A few units share the exact same name across quantities, which give extension method name conflicts. - # We add "OmitExtensionMethod": true on all but one of the conflicting units in JSON. - if ($unit.OmitExtensionMethod) { continue } -@" - /// $($obsoleteAttribute) - public static $quantityName $($unit.PluralName)(this T value) => $quantityName.From$($unit.PluralName)(Convert.ToDouble(value)); - -"@; }@" - } -} -#endif -"@; -}