Skip to content

Commit fe8b3e9

Browse files
tmilnthorpangularsen
authored andcommitted
Split ParseUnit(string, string) into WRC and NetFx codegen
The .NET Framwork version one is obsolete and will be removed in the future, but the WRC version is not and would be a breaking change to remove.
1 parent a4e4768 commit fe8b3e9

File tree

273 files changed

+2821
-1456
lines changed

Some content is hidden

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

273 files changed

+2821
-1456
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -692,22 +692,6 @@ public static AccelerationUnit ParseUnit(string str)
692692
return ParseUnit(str, (IFormatProvider)null);
693693
}
694694

695-
/// <summary>
696-
/// Parse a unit string.
697-
/// </summary>
698-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
699-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
700-
/// <example>
701-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
702-
/// </example>
703-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
704-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
705-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
706-
public static AccelerationUnit ParseUnit(string str, [CanBeNull] string cultureName)
707-
{
708-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
709-
}
710-
711695
#endregion
712696

713697
/// <summary>

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -713,22 +713,6 @@ public static AmountOfSubstanceUnit ParseUnit(string str)
713713
return ParseUnit(str, (IFormatProvider)null);
714714
}
715715

716-
/// <summary>
717-
/// Parse a unit string.
718-
/// </summary>
719-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
720-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
721-
/// <example>
722-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
723-
/// </example>
724-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
725-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
726-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
727-
public static AmountOfSubstanceUnit ParseUnit(string str, [CanBeNull] string cultureName)
728-
{
729-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
730-
}
731-
732716
#endregion
733717

734718
/// <summary>

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -502,22 +502,6 @@ public static AmplitudeRatioUnit ParseUnit(string str)
502502
return ParseUnit(str, (IFormatProvider)null);
503503
}
504504

505-
/// <summary>
506-
/// Parse a unit string.
507-
/// </summary>
508-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
509-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
510-
/// <example>
511-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
512-
/// </example>
513-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
514-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
515-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
516-
public static AmplitudeRatioUnit ParseUnit(string str, [CanBeNull] string cultureName)
517-
{
518-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
519-
}
520-
521505
#endregion
522506

523507
/// <summary>

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -712,22 +712,6 @@ public static AngleUnit ParseUnit(string str)
712712
return ParseUnit(str, (IFormatProvider)null);
713713
}
714714

715-
/// <summary>
716-
/// Parse a unit string.
717-
/// </summary>
718-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
719-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
720-
/// <example>
721-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
722-
/// </example>
723-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
724-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
725-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
726-
public static AngleUnit ParseUnit(string str, [CanBeNull] string cultureName)
727-
{
728-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
729-
}
730-
731715
#endregion
732716

733717
/// <summary>

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -482,22 +482,6 @@ public static ApparentEnergyUnit ParseUnit(string str)
482482
return ParseUnit(str, (IFormatProvider)null);
483483
}
484484

485-
/// <summary>
486-
/// Parse a unit string.
487-
/// </summary>
488-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
489-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
490-
/// <example>
491-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
492-
/// </example>
493-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
494-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
495-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
496-
public static ApparentEnergyUnit ParseUnit(string str, [CanBeNull] string cultureName)
497-
{
498-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
499-
}
500-
501485
#endregion
502486

503487
/// <summary>

Common/GeneratedCode/Quantities/ApparentPower.Common.g.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -503,22 +503,6 @@ public static ApparentPowerUnit ParseUnit(string str)
503503
return ParseUnit(str, (IFormatProvider)null);
504504
}
505505

506-
/// <summary>
507-
/// Parse a unit string.
508-
/// </summary>
509-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
510-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
511-
/// <example>
512-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
513-
/// </example>
514-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
515-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
516-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
517-
public static ApparentPowerUnit ParseUnit(string str, [CanBeNull] string cultureName)
518-
{
519-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
520-
}
521-
522506
#endregion
523507

524508
/// <summary>

Common/GeneratedCode/Quantities/Area.Common.g.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -692,22 +692,6 @@ public static AreaUnit ParseUnit(string str)
692692
return ParseUnit(str, (IFormatProvider)null);
693693
}
694694

695-
/// <summary>
696-
/// Parse a unit string.
697-
/// </summary>
698-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
699-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
700-
/// <example>
701-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
702-
/// </example>
703-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
704-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
705-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
706-
public static AreaUnit ParseUnit(string str, [CanBeNull] string cultureName)
707-
{
708-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
709-
}
710-
711695
#endregion
712696

713697
/// <summary>

Common/GeneratedCode/Quantities/AreaDensity.Common.g.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -440,22 +440,6 @@ public static AreaDensityUnit ParseUnit(string str)
440440
return ParseUnit(str, (IFormatProvider)null);
441441
}
442442

443-
/// <summary>
444-
/// Parse a unit string.
445-
/// </summary>
446-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
447-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
448-
/// <example>
449-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
450-
/// </example>
451-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
452-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
453-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
454-
public static AreaDensityUnit ParseUnit(string str, [CanBeNull] string cultureName)
455-
{
456-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
457-
}
458-
459443
#endregion
460444

461445
/// <summary>

Common/GeneratedCode/Quantities/AreaMomentOfInertia.Common.g.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -545,22 +545,6 @@ public static AreaMomentOfInertiaUnit ParseUnit(string str)
545545
return ParseUnit(str, (IFormatProvider)null);
546546
}
547547

548-
/// <summary>
549-
/// Parse a unit string.
550-
/// </summary>
551-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
552-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
553-
/// <example>
554-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
555-
/// </example>
556-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
557-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
558-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
559-
public static AreaMomentOfInertiaUnit ParseUnit(string str, [CanBeNull] string cultureName)
560-
{
561-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
562-
}
563-
564548
#endregion
565549

566550
/// <summary>

Common/GeneratedCode/Quantities/BitRate.Common.g.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -963,22 +963,6 @@ public static BitRateUnit ParseUnit(string str)
963963
return ParseUnit(str, (IFormatProvider)null);
964964
}
965965

966-
/// <summary>
967-
/// Parse a unit string.
968-
/// </summary>
969-
/// <param name="str">String to parse. Typically in the form: {number} {unit}</param>
970-
/// <param name="cultureName">Name of culture (ex: "en-US") to use when parsing number and unit. Defaults to <see cref="UnitSystem" />'s default culture.</param>
971-
/// <example>
972-
/// Length.ParseUnit("m", new CultureInfo("en-US"));
973-
/// </example>
974-
/// <exception cref="ArgumentNullException">The value of 'str' cannot be null. </exception>
975-
/// <exception cref="UnitsNetException">Error parsing string.</exception>
976-
[Obsolete("Use overload that takes IFormatProvider instead of culture name. This method was only added to support WindowsRuntimeComponent and will be removed from other .NET targets.")]
977-
public static BitRateUnit ParseUnit(string str, [CanBeNull] string cultureName)
978-
{
979-
return ParseUnit(str, cultureName == null ? null : new CultureInfo(cultureName));
980-
}
981-
982966
#endregion
983967

984968
/// <summary>

0 commit comments

Comments
 (0)