Skip to content

Commit c32c9d2

Browse files
committed
Removing obsolete methods
1 parent 3c09292 commit c32c9d2

File tree

190 files changed

+220
-5556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+220
-5556
lines changed

Common/GeneratedCode/Quantities/Acceleration.Common.g.cs

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,11 @@ static Acceleration()
8282
BaseDimensions = new BaseDimensions(1, 0, -2, 0, 0, 0, 0);
8383
}
8484

85-
/// <summary>
86-
/// Creates the quantity with the given value in the base unit MeterPerSecondSquared.
87-
/// </summary>
88-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
89-
public Acceleration(double meterspersecondsquared)
90-
{
91-
_value = Convert.ToDouble(meterspersecondsquared);
92-
_unit = BaseUnit;
93-
}
94-
9585
/// <summary>
9686
/// Creates the quantity with the given numeric value and unit.
9787
/// </summary>
9888
/// <param name="numericValue">Numeric value.</param>
99-
/// <param name="unit">Unit representation.</param>
89+
/// <param name="unit">The unit representation to contruct this quantity with.</param>
10090
/// <remarks>Value parameter cannot be named 'value' due to constraint when targeting Windows Runtime Component.</remarks>
10191
#if WINDOWS_UWP
10292
private
@@ -109,33 +99,6 @@ public Acceleration(double meterspersecondsquared)
10999
_unit = unit;
110100
}
111101

112-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
113-
/// <summary>
114-
/// Creates the quantity with the given value assuming the base unit MeterPerSecondSquared.
115-
/// </summary>
116-
/// <param name="meterspersecondsquared">Value assuming base unit MeterPerSecondSquared.</param>
117-
#if WINDOWS_UWP
118-
private
119-
#else
120-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
121-
public
122-
#endif
123-
Acceleration(long meterspersecondsquared) : this(Convert.ToDouble(meterspersecondsquared), BaseUnit) { }
124-
125-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
126-
// Windows Runtime Component does not support decimal type
127-
/// <summary>
128-
/// Creates the quantity with the given value assuming the base unit MeterPerSecondSquared.
129-
/// </summary>
130-
/// <param name="meterspersecondsquared">Value assuming base unit MeterPerSecondSquared.</param>
131-
#if WINDOWS_UWP
132-
private
133-
#else
134-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
135-
public
136-
#endif
137-
Acceleration(decimal meterspersecondsquared) : this(Convert.ToDouble(meterspersecondsquared), BaseUnit) { }
138-
139102
#region Properties
140103

141104
/// <summary>
@@ -144,7 +107,7 @@ public Acceleration(double meterspersecondsquared)
144107
public static QuantityType QuantityType => QuantityType.Acceleration;
145108

146109
/// <summary>
147-
/// The base unit representation of this quantity for the numeric value stored internally. All conversions go via this value.
110+
/// The base unit of Acceleration, which is MeterPerSecondSquared. All conversions go via this value.
148111
/// </summary>
149112
public static AccelerationUnit BaseUnit => AccelerationUnit.MeterPerSecondSquared;
150113

@@ -670,12 +633,6 @@ public static AccelerationUnit ParseUnit(string str)
670633

671634
#endregion
672635

673-
/// <summary>
674-
/// Set the default unit used by ToString(). Default is MeterPerSecondSquared
675-
/// </summary>
676-
[Obsolete("This is no longer used since we will instead use the quantity's Unit value as default.")]
677-
public static AccelerationUnit ToStringDefaultUnit { get; set; } = AccelerationUnit.MeterPerSecondSquared;
678-
679636
/// <summary>
680637
/// Get default string representation of value and unit.
681638
/// </summary>

Common/GeneratedCode/Quantities/AmountOfSubstance.Common.g.cs

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,11 @@ static AmountOfSubstance()
8282
BaseDimensions = new BaseDimensions(0, 0, 0, 0, 0, 1, 0);
8383
}
8484

85-
/// <summary>
86-
/// Creates the quantity with the given value in the base unit Mole.
87-
/// </summary>
88-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
89-
public AmountOfSubstance(double moles)
90-
{
91-
_value = Convert.ToDouble(moles);
92-
_unit = BaseUnit;
93-
}
94-
9585
/// <summary>
9686
/// Creates the quantity with the given numeric value and unit.
9787
/// </summary>
9888
/// <param name="numericValue">Numeric value.</param>
99-
/// <param name="unit">Unit representation.</param>
89+
/// <param name="unit">The unit representation to contruct this quantity with.</param>
10090
/// <remarks>Value parameter cannot be named 'value' due to constraint when targeting Windows Runtime Component.</remarks>
10191
#if WINDOWS_UWP
10292
private
@@ -109,33 +99,6 @@ public AmountOfSubstance(double moles)
10999
_unit = unit;
110100
}
111101

112-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
113-
/// <summary>
114-
/// Creates the quantity with the given value assuming the base unit Mole.
115-
/// </summary>
116-
/// <param name="moles">Value assuming base unit Mole.</param>
117-
#if WINDOWS_UWP
118-
private
119-
#else
120-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
121-
public
122-
#endif
123-
AmountOfSubstance(long moles) : this(Convert.ToDouble(moles), BaseUnit) { }
124-
125-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
126-
// Windows Runtime Component does not support decimal type
127-
/// <summary>
128-
/// Creates the quantity with the given value assuming the base unit Mole.
129-
/// </summary>
130-
/// <param name="moles">Value assuming base unit Mole.</param>
131-
#if WINDOWS_UWP
132-
private
133-
#else
134-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
135-
public
136-
#endif
137-
AmountOfSubstance(decimal moles) : this(Convert.ToDouble(moles), BaseUnit) { }
138-
139102
#region Properties
140103

141104
/// <summary>
@@ -144,7 +107,7 @@ public AmountOfSubstance(double moles)
144107
public static QuantityType QuantityType => QuantityType.AmountOfSubstance;
145108

146109
/// <summary>
147-
/// The base unit representation of this quantity for the numeric value stored internally. All conversions go via this value.
110+
/// The base unit of AmountOfSubstance, which is Mole. All conversions go via this value.
148111
/// </summary>
149112
public static AmountOfSubstanceUnit BaseUnit => AmountOfSubstanceUnit.Mole;
150113

@@ -691,12 +654,6 @@ public static AmountOfSubstanceUnit ParseUnit(string str)
691654

692655
#endregion
693656

694-
/// <summary>
695-
/// Set the default unit used by ToString(). Default is Mole
696-
/// </summary>
697-
[Obsolete("This is no longer used since we will instead use the quantity's Unit value as default.")]
698-
public static AmountOfSubstanceUnit ToStringDefaultUnit { get; set; } = AmountOfSubstanceUnit.Mole;
699-
700657
/// <summary>
701658
/// Get default string representation of value and unit.
702659
/// </summary>

Common/GeneratedCode/Quantities/AmplitudeRatio.Common.g.cs

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,11 @@ static AmplitudeRatio()
8181
{
8282
}
8383

84-
/// <summary>
85-
/// Creates the quantity with the given value in the base unit DecibelVolt.
86-
/// </summary>
87-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
88-
public AmplitudeRatio(double decibelvolts)
89-
{
90-
_value = Convert.ToDouble(decibelvolts);
91-
_unit = BaseUnit;
92-
}
93-
9484
/// <summary>
9585
/// Creates the quantity with the given numeric value and unit.
9686
/// </summary>
9787
/// <param name="numericValue">Numeric value.</param>
98-
/// <param name="unit">Unit representation.</param>
88+
/// <param name="unit">The unit representation to contruct this quantity with.</param>
9989
/// <remarks>Value parameter cannot be named 'value' due to constraint when targeting Windows Runtime Component.</remarks>
10090
#if WINDOWS_UWP
10191
private
@@ -108,33 +98,6 @@ public AmplitudeRatio(double decibelvolts)
10898
_unit = unit;
10999
}
110100

111-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
112-
/// <summary>
113-
/// Creates the quantity with the given value assuming the base unit DecibelVolt.
114-
/// </summary>
115-
/// <param name="decibelvolts">Value assuming base unit DecibelVolt.</param>
116-
#if WINDOWS_UWP
117-
private
118-
#else
119-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
120-
public
121-
#endif
122-
AmplitudeRatio(long decibelvolts) : this(Convert.ToDouble(decibelvolts), BaseUnit) { }
123-
124-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
125-
// Windows Runtime Component does not support decimal type
126-
/// <summary>
127-
/// Creates the quantity with the given value assuming the base unit DecibelVolt.
128-
/// </summary>
129-
/// <param name="decibelvolts">Value assuming base unit DecibelVolt.</param>
130-
#if WINDOWS_UWP
131-
private
132-
#else
133-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
134-
public
135-
#endif
136-
AmplitudeRatio(decimal decibelvolts) : this(Convert.ToDouble(decibelvolts), BaseUnit) { }
137-
138101
#region Properties
139102

140103
/// <summary>
@@ -143,7 +106,7 @@ public AmplitudeRatio(double decibelvolts)
143106
public static QuantityType QuantityType => QuantityType.AmplitudeRatio;
144107

145108
/// <summary>
146-
/// The base unit representation of this quantity for the numeric value stored internally. All conversions go via this value.
109+
/// The base unit of AmplitudeRatio, which is DecibelVolt. All conversions go via this value.
147110
/// </summary>
148111
public static AmplitudeRatioUnit BaseUnit => AmplitudeRatioUnit.DecibelVolt;
149112

@@ -480,12 +443,6 @@ public static AmplitudeRatioUnit ParseUnit(string str)
480443

481444
#endregion
482445

483-
/// <summary>
484-
/// Set the default unit used by ToString(). Default is DecibelVolt
485-
/// </summary>
486-
[Obsolete("This is no longer used since we will instead use the quantity's Unit value as default.")]
487-
public static AmplitudeRatioUnit ToStringDefaultUnit { get; set; } = AmplitudeRatioUnit.DecibelVolt;
488-
489446
/// <summary>
490447
/// Get default string representation of value and unit.
491448
/// </summary>

Common/GeneratedCode/Quantities/Angle.Common.g.cs

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,11 @@ static Angle()
8181
{
8282
}
8383

84-
/// <summary>
85-
/// Creates the quantity with the given value in the base unit Degree.
86-
/// </summary>
87-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
88-
public Angle(double degrees)
89-
{
90-
_value = Convert.ToDouble(degrees);
91-
_unit = BaseUnit;
92-
}
93-
9484
/// <summary>
9585
/// Creates the quantity with the given numeric value and unit.
9686
/// </summary>
9787
/// <param name="numericValue">Numeric value.</param>
98-
/// <param name="unit">Unit representation.</param>
88+
/// <param name="unit">The unit representation to contruct this quantity with.</param>
9989
/// <remarks>Value parameter cannot be named 'value' due to constraint when targeting Windows Runtime Component.</remarks>
10090
#if WINDOWS_UWP
10191
private
@@ -108,33 +98,6 @@ public Angle(double degrees)
10898
_unit = unit;
10999
}
110100

111-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
112-
/// <summary>
113-
/// Creates the quantity with the given value assuming the base unit Degree.
114-
/// </summary>
115-
/// <param name="degrees">Value assuming base unit Degree.</param>
116-
#if WINDOWS_UWP
117-
private
118-
#else
119-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
120-
public
121-
#endif
122-
Angle(long degrees) : this(Convert.ToDouble(degrees), BaseUnit) { }
123-
124-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
125-
// Windows Runtime Component does not support decimal type
126-
/// <summary>
127-
/// Creates the quantity with the given value assuming the base unit Degree.
128-
/// </summary>
129-
/// <param name="degrees">Value assuming base unit Degree.</param>
130-
#if WINDOWS_UWP
131-
private
132-
#else
133-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
134-
public
135-
#endif
136-
Angle(decimal degrees) : this(Convert.ToDouble(degrees), BaseUnit) { }
137-
138101
#region Properties
139102

140103
/// <summary>
@@ -143,7 +106,7 @@ public Angle(double degrees)
143106
public static QuantityType QuantityType => QuantityType.Angle;
144107

145108
/// <summary>
146-
/// The base unit representation of this quantity for the numeric value stored internally. All conversions go via this value.
109+
/// The base unit of Angle, which is Degree. All conversions go via this value.
147110
/// </summary>
148111
public static AngleUnit BaseUnit => AngleUnit.Degree;
149112

@@ -690,12 +653,6 @@ public static AngleUnit ParseUnit(string str)
690653

691654
#endregion
692655

693-
/// <summary>
694-
/// Set the default unit used by ToString(). Default is Degree
695-
/// </summary>
696-
[Obsolete("This is no longer used since we will instead use the quantity's Unit value as default.")]
697-
public static AngleUnit ToStringDefaultUnit { get; set; } = AngleUnit.Degree;
698-
699656
/// <summary>
700657
/// Get default string representation of value and unit.
701658
/// </summary>

Common/GeneratedCode/Quantities/ApparentEnergy.Common.g.cs

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,11 @@ static ApparentEnergy()
8282
BaseDimensions = new BaseDimensions(2, 1, -2, 0, 0, 0, 0);
8383
}
8484

85-
/// <summary>
86-
/// Creates the quantity with the given value in the base unit VoltampereHour.
87-
/// </summary>
88-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
89-
public ApparentEnergy(double voltamperehours)
90-
{
91-
_value = Convert.ToDouble(voltamperehours);
92-
_unit = BaseUnit;
93-
}
94-
9585
/// <summary>
9686
/// Creates the quantity with the given numeric value and unit.
9787
/// </summary>
9888
/// <param name="numericValue">Numeric value.</param>
99-
/// <param name="unit">Unit representation.</param>
89+
/// <param name="unit">The unit representation to contruct this quantity with.</param>
10090
/// <remarks>Value parameter cannot be named 'value' due to constraint when targeting Windows Runtime Component.</remarks>
10191
#if WINDOWS_UWP
10292
private
@@ -109,33 +99,6 @@ public ApparentEnergy(double voltamperehours)
10999
_unit = unit;
110100
}
111101

112-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
113-
/// <summary>
114-
/// Creates the quantity with the given value assuming the base unit VoltampereHour.
115-
/// </summary>
116-
/// <param name="voltamperehours">Value assuming base unit VoltampereHour.</param>
117-
#if WINDOWS_UWP
118-
private
119-
#else
120-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
121-
public
122-
#endif
123-
ApparentEnergy(long voltamperehours) : this(Convert.ToDouble(voltamperehours), BaseUnit) { }
124-
125-
// Windows Runtime Component does not allow public methods/ctors with same number of parameters: https://msdn.microsoft.com/en-us/library/br230301.aspx#Overloaded methods
126-
// Windows Runtime Component does not support decimal type
127-
/// <summary>
128-
/// Creates the quantity with the given value assuming the base unit VoltampereHour.
129-
/// </summary>
130-
/// <param name="voltamperehours">Value assuming base unit VoltampereHour.</param>
131-
#if WINDOWS_UWP
132-
private
133-
#else
134-
[Obsolete("Use the constructor that takes a unit parameter. This constructor will be removed in a future version.")]
135-
public
136-
#endif
137-
ApparentEnergy(decimal voltamperehours) : this(Convert.ToDouble(voltamperehours), BaseUnit) { }
138-
139102
#region Properties
140103

141104
/// <summary>
@@ -144,7 +107,7 @@ public ApparentEnergy(double voltamperehours)
144107
public static QuantityType QuantityType => QuantityType.ApparentEnergy;
145108

146109
/// <summary>
147-
/// The base unit representation of this quantity for the numeric value stored internally. All conversions go via this value.
110+
/// The base unit of ApparentEnergy, which is VoltampereHour. All conversions go via this value.
148111
/// </summary>
149112
public static ApparentEnergyUnit BaseUnit => ApparentEnergyUnit.VoltampereHour;
150113

@@ -460,12 +423,6 @@ public static ApparentEnergyUnit ParseUnit(string str)
460423

461424
#endregion
462425

463-
/// <summary>
464-
/// Set the default unit used by ToString(). Default is VoltampereHour
465-
/// </summary>
466-
[Obsolete("This is no longer used since we will instead use the quantity's Unit value as default.")]
467-
public static ApparentEnergyUnit ToStringDefaultUnit { get; set; } = ApparentEnergyUnit.VoltampereHour;
468-
469426
/// <summary>
470427
/// Get default string representation of value and unit.
471428
/// </summary>

0 commit comments

Comments
 (0)