Skip to content

Commit 6cfc4c8

Browse files
committed
Merge remote-tracking branch 'angularsen/master' into v4
2 parents 4baa18e + a4e4768 commit 6cfc4c8

13 files changed

+87
-4
lines changed

Common/GeneratedCode/Quantities/Duration.Common.g.cs

+2
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ public static Duration FromMinutes(QuantityValue minutes)
305305
/// <summary>
306306
/// Get Duration from Months.
307307
/// </summary>
308+
[System.Obsolete("Use Month30 instead, which makes it clear that this is an approximate unit based on 30 days per month. The duration of a month varies, but the Gregorian solar calendar has 365.2425/12 = 30.44 days on average.")]
308309
#if WINDOWS_UWP
309310
[Windows.Foundation.Metadata.DefaultOverload]
310311
public static Duration FromMonths(double months)
@@ -375,6 +376,7 @@ public static Duration FromWeeks(QuantityValue weeks)
375376
/// <summary>
376377
/// Get Duration from Years.
377378
/// </summary>
379+
[System.Obsolete("Use Year365 instead, which makes it clear that this is an approximate unit based on 365 days per year. The duration of a year varies due to corrections such as leap years, since a Gregorian solar calendar has 365.2425 days.")]
378380
#if WINDOWS_UWP
379381
[Windows.Foundation.Metadata.DefaultOverload]
380382
public static Duration FromYears(double years)

Common/GeneratedCode/Quantities/Flow.Common.g.cs

+19
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ namespace UnitsNet
5252
/// In physics and engineering, in particular fluid dynamics and hydrometry, the volumetric flow rate, (also known as volume flow rate, rate of fluid flow or volume velocity) is the volume of fluid which passes through a given surface per unit time. The SI unit is m³/s (cubic meters per second). In US Customary Units and British Imperial Units, volumetric flow rate is often expressed as ft³/s (cubic feet per second). It is usually represented by the symbol Q.
5353
/// </summary>
5454
// ReSharper disable once PartialTypeWithSinglePart
55+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
5556

5657
// Windows Runtime Component has constraints on public types: https://msdn.microsoft.com/en-us/library/br230301.aspx#Declaring types in Windows Runtime Components
5758
// Public structures can't have any members other than public fields, and those fields must be value types or strings.
@@ -325,6 +326,7 @@ public static Flow FromCentilitersPerMinute(QuantityValue centilitersperminute)
325326
/// <summary>
326327
/// Get Flow from CubicDecimetersPerMinute.
327328
/// </summary>
329+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
328330
#if WINDOWS_UWP
329331
[Windows.Foundation.Metadata.DefaultOverload]
330332
public static Flow FromCubicDecimetersPerMinute(double cubicdecimetersperminute)
@@ -339,6 +341,7 @@ public static Flow FromCubicDecimetersPerMinute(QuantityValue cubicdecimetersper
339341
/// <summary>
340342
/// Get Flow from CubicFeetPerHour.
341343
/// </summary>
344+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
342345
#if WINDOWS_UWP
343346
[Windows.Foundation.Metadata.DefaultOverload]
344347
public static Flow FromCubicFeetPerHour(double cubicfeetperhour)
@@ -353,6 +356,7 @@ public static Flow FromCubicFeetPerHour(QuantityValue cubicfeetperhour)
353356
/// <summary>
354357
/// Get Flow from CubicFeetPerMinute.
355358
/// </summary>
359+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
356360
#if WINDOWS_UWP
357361
[Windows.Foundation.Metadata.DefaultOverload]
358362
public static Flow FromCubicFeetPerMinute(double cubicfeetperminute)
@@ -367,6 +371,7 @@ public static Flow FromCubicFeetPerMinute(QuantityValue cubicfeetperminute)
367371
/// <summary>
368372
/// Get Flow from CubicFeetPerSecond.
369373
/// </summary>
374+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
370375
#if WINDOWS_UWP
371376
[Windows.Foundation.Metadata.DefaultOverload]
372377
public static Flow FromCubicFeetPerSecond(double cubicfeetpersecond)
@@ -381,6 +386,7 @@ public static Flow FromCubicFeetPerSecond(QuantityValue cubicfeetpersecond)
381386
/// <summary>
382387
/// Get Flow from CubicMetersPerHour.
383388
/// </summary>
389+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
384390
#if WINDOWS_UWP
385391
[Windows.Foundation.Metadata.DefaultOverload]
386392
public static Flow FromCubicMetersPerHour(double cubicmetersperhour)
@@ -395,6 +401,7 @@ public static Flow FromCubicMetersPerHour(QuantityValue cubicmetersperhour)
395401
/// <summary>
396402
/// Get Flow from CubicMetersPerMinute.
397403
/// </summary>
404+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
398405
#if WINDOWS_UWP
399406
[Windows.Foundation.Metadata.DefaultOverload]
400407
public static Flow FromCubicMetersPerMinute(double cubicmetersperminute)
@@ -409,6 +416,7 @@ public static Flow FromCubicMetersPerMinute(QuantityValue cubicmetersperminute)
409416
/// <summary>
410417
/// Get Flow from CubicMetersPerSecond.
411418
/// </summary>
419+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
412420
#if WINDOWS_UWP
413421
[Windows.Foundation.Metadata.DefaultOverload]
414422
public static Flow FromCubicMetersPerSecond(double cubicmeterspersecond)
@@ -423,6 +431,7 @@ public static Flow FromCubicMetersPerSecond(QuantityValue cubicmeterspersecond)
423431
/// <summary>
424432
/// Get Flow from CubicYardsPerHour.
425433
/// </summary>
434+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
426435
#if WINDOWS_UWP
427436
[Windows.Foundation.Metadata.DefaultOverload]
428437
public static Flow FromCubicYardsPerHour(double cubicyardsperhour)
@@ -437,6 +446,7 @@ public static Flow FromCubicYardsPerHour(QuantityValue cubicyardsperhour)
437446
/// <summary>
438447
/// Get Flow from CubicYardsPerMinute.
439448
/// </summary>
449+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
440450
#if WINDOWS_UWP
441451
[Windows.Foundation.Metadata.DefaultOverload]
442452
public static Flow FromCubicYardsPerMinute(double cubicyardsperminute)
@@ -451,6 +461,7 @@ public static Flow FromCubicYardsPerMinute(QuantityValue cubicyardsperminute)
451461
/// <summary>
452462
/// Get Flow from CubicYardsPerSecond.
453463
/// </summary>
464+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
454465
#if WINDOWS_UWP
455466
[Windows.Foundation.Metadata.DefaultOverload]
456467
public static Flow FromCubicYardsPerSecond(double cubicyardspersecond)
@@ -493,6 +504,7 @@ public static Flow FromKilolitersPerMinute(QuantityValue kilolitersperminute)
493504
/// <summary>
494505
/// Get Flow from LitersPerHour.
495506
/// </summary>
507+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
496508
#if WINDOWS_UWP
497509
[Windows.Foundation.Metadata.DefaultOverload]
498510
public static Flow FromLitersPerHour(double litersperhour)
@@ -507,6 +519,7 @@ public static Flow FromLitersPerHour(QuantityValue litersperhour)
507519
/// <summary>
508520
/// Get Flow from LitersPerMinute.
509521
/// </summary>
522+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
510523
#if WINDOWS_UWP
511524
[Windows.Foundation.Metadata.DefaultOverload]
512525
public static Flow FromLitersPerMinute(double litersperminute)
@@ -521,6 +534,7 @@ public static Flow FromLitersPerMinute(QuantityValue litersperminute)
521534
/// <summary>
522535
/// Get Flow from LitersPerSecond.
523536
/// </summary>
537+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
524538
#if WINDOWS_UWP
525539
[Windows.Foundation.Metadata.DefaultOverload]
526540
public static Flow FromLitersPerSecond(double literspersecond)
@@ -563,6 +577,7 @@ public static Flow FromMillilitersPerMinute(QuantityValue millilitersperminute)
563577
/// <summary>
564578
/// Get Flow from MillionUsGallonsPerDay.
565579
/// </summary>
580+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
566581
#if WINDOWS_UWP
567582
[Windows.Foundation.Metadata.DefaultOverload]
568583
public static Flow FromMillionUsGallonsPerDay(double millionusgallonsperday)
@@ -591,6 +606,7 @@ public static Flow FromNanolitersPerMinute(QuantityValue nanolitersperminute)
591606
/// <summary>
592607
/// Get Flow from OilBarrelsPerDay.
593608
/// </summary>
609+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
594610
#if WINDOWS_UWP
595611
[Windows.Foundation.Metadata.DefaultOverload]
596612
public static Flow FromOilBarrelsPerDay(double oilbarrelsperday)
@@ -605,6 +621,7 @@ public static Flow FromOilBarrelsPerDay(QuantityValue oilbarrelsperday)
605621
/// <summary>
606622
/// Get Flow from UsGallonsPerHour.
607623
/// </summary>
624+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
608625
#if WINDOWS_UWP
609626
[Windows.Foundation.Metadata.DefaultOverload]
610627
public static Flow FromUsGallonsPerHour(double usgallonsperhour)
@@ -619,6 +636,7 @@ public static Flow FromUsGallonsPerHour(QuantityValue usgallonsperhour)
619636
/// <summary>
620637
/// Get Flow from UsGallonsPerMinute.
621638
/// </summary>
639+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
622640
#if WINDOWS_UWP
623641
[Windows.Foundation.Metadata.DefaultOverload]
624642
public static Flow FromUsGallonsPerMinute(double usgallonsperminute)
@@ -633,6 +651,7 @@ public static Flow FromUsGallonsPerMinute(QuantityValue usgallonsperminute)
633651
/// <summary>
634652
/// Get Flow from UsGallonsPerSecond.
635653
/// </summary>
654+
[System.Obsolete("Deprecated due to github issue #363, please use VolumeFlow instead")]
636655
#if WINDOWS_UWP
637656
[Windows.Foundation.Metadata.DefaultOverload]
638657
public static Flow FromUsGallonsPerSecond(double usgallonspersecond)

Common/GeneratedCode/Quantities/Pressure.Common.g.cs

+1
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ public static Pressure FromPoundsForcePerSquareInch(QuantityValue poundsforceper
812812
/// <summary>
813813
/// Get Pressure from Psi.
814814
/// </summary>
815+
[System.Obsolete("Deprecated due to github issue #215, please use PoundForcePerSquareInch instead")]
815816
#if WINDOWS_UWP
816817
[Windows.Foundation.Metadata.DefaultOverload]
817818
public static Pressure FromPsi(double psi)

Common/GeneratedCode/Quantities/TemperatureDelta.Common.g.cs

+8
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ public static TemperatureDelta FromDegreesCelsius(QuantityValue degreescelsius)
274274
/// <summary>
275275
/// Get TemperatureDelta from DegreesCelsiusDelta.
276276
/// </summary>
277+
[System.Obsolete("Deprecated due to github issue #180, please use DegreeCelsius instead")]
277278
#if WINDOWS_UWP
278279
[Windows.Foundation.Metadata.DefaultOverload]
279280
public static TemperatureDelta FromDegreesCelsiusDelta(double degreescelsiusdelta)
@@ -302,6 +303,7 @@ public static TemperatureDelta FromDegreesDelisle(QuantityValue degreesdelisle)
302303
/// <summary>
303304
/// Get TemperatureDelta from DegreesDelisleDelta.
304305
/// </summary>
306+
[System.Obsolete("Deprecated due to github issue #180, please use DegreeDelisle instead")]
305307
#if WINDOWS_UWP
306308
[Windows.Foundation.Metadata.DefaultOverload]
307309
public static TemperatureDelta FromDegreesDelisleDelta(double degreesdelisledelta)
@@ -330,6 +332,7 @@ public static TemperatureDelta FromDegreesFahrenheit(QuantityValue degreesfahren
330332
/// <summary>
331333
/// Get TemperatureDelta from DegreesFahrenheitDelta.
332334
/// </summary>
335+
[System.Obsolete("Deprecated due to github issue #180, please use DegreeFahrenheit instead")]
333336
#if WINDOWS_UWP
334337
[Windows.Foundation.Metadata.DefaultOverload]
335338
public static TemperatureDelta FromDegreesFahrenheitDelta(double degreesfahrenheitdelta)
@@ -358,6 +361,7 @@ public static TemperatureDelta FromDegreesNewton(QuantityValue degreesnewton)
358361
/// <summary>
359362
/// Get TemperatureDelta from DegreesNewtonDelta.
360363
/// </summary>
364+
[System.Obsolete("Deprecated due to github issue #180, please use DegreeNewton instead")]
361365
#if WINDOWS_UWP
362366
[Windows.Foundation.Metadata.DefaultOverload]
363367
public static TemperatureDelta FromDegreesNewtonDelta(double degreesnewtondelta)
@@ -386,6 +390,7 @@ public static TemperatureDelta FromDegreesRankine(QuantityValue degreesrankine)
386390
/// <summary>
387391
/// Get TemperatureDelta from DegreesRankineDelta.
388392
/// </summary>
393+
[System.Obsolete("Deprecated due to github issue #180, please use DegreeRankine instead")]
389394
#if WINDOWS_UWP
390395
[Windows.Foundation.Metadata.DefaultOverload]
391396
public static TemperatureDelta FromDegreesRankineDelta(double degreesrankinedelta)
@@ -414,6 +419,7 @@ public static TemperatureDelta FromDegreesReaumur(QuantityValue degreesreaumur)
414419
/// <summary>
415420
/// Get TemperatureDelta from DegreesReaumurDelta.
416421
/// </summary>
422+
[System.Obsolete("Deprecated due to github issue #180, please use DegreeReaumur instead")]
417423
#if WINDOWS_UWP
418424
[Windows.Foundation.Metadata.DefaultOverload]
419425
public static TemperatureDelta FromDegreesReaumurDelta(double degreesreaumurdelta)
@@ -442,6 +448,7 @@ public static TemperatureDelta FromDegreesRoemer(QuantityValue degreesroemer)
442448
/// <summary>
443449
/// Get TemperatureDelta from DegreesRoemerDelta.
444450
/// </summary>
451+
[System.Obsolete("Deprecated due to github issue #180, please use DegreeRoemer instead")]
445452
#if WINDOWS_UWP
446453
[Windows.Foundation.Metadata.DefaultOverload]
447454
public static TemperatureDelta FromDegreesRoemerDelta(double degreesroemerdelta)
@@ -470,6 +477,7 @@ public static TemperatureDelta FromKelvins(QuantityValue kelvins)
470477
/// <summary>
471478
/// Get TemperatureDelta from KelvinsDelta.
472479
/// </summary>
480+
[System.Obsolete("Deprecated due to github issue #180, please use Kelvin instead")]
473481
#if WINDOWS_UWP
474482
[Windows.Foundation.Metadata.DefaultOverload]
475483
public static TemperatureDelta FromKelvinsDelta(double kelvinsdelta)

Common/GeneratedCode/Quantities/Volume.Common.g.cs

+2
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ public static Volume FromOilBarrels(QuantityValue oilbarrels)
843843
/// <summary>
844844
/// Get Volume from Tablespoons.
845845
/// </summary>
846+
[System.Obsolete("Deprecated due to github issue #134, please use UsTablespoon instead")]
846847
#if WINDOWS_UWP
847848
[Windows.Foundation.Metadata.DefaultOverload]
848849
public static Volume FromTablespoons(double tablespoons)
@@ -857,6 +858,7 @@ public static Volume FromTablespoons(QuantityValue tablespoons)
857858
/// <summary>
858859
/// Get Volume from Teaspoons.
859860
/// </summary>
861+
[System.Obsolete("Deprecated due to github issue #134, please use UsTeaspoon instead")]
860862
#if WINDOWS_UWP
861863
[Windows.Foundation.Metadata.DefaultOverload]
862864
public static Volume FromTeaspoons(double teaspoons)

Common/UnitDefinitions/Flow.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"Name": "Flow",
3+
"ObsoleteText": "Deprecated due to github issue #363, please use VolumeFlow instead",
34
"BaseUnit": "CubicMeterPerSecond",
45
"XmlDoc": "In physics and engineering, in particular fluid dynamics and hydrometry, the volumetric flow rate, (also known as volume flow rate, rate of fluid flow or volume velocity) is the volume of fluid which passes through a given surface per unit time. The SI unit is m³/s (cubic meters per second). In US Customary Units and British Imperial Units, volumetric flow rate is often expressed as ft³/s (cubic feet per second). It is usually represented by the symbol Q.",
56
"BaseDimensions": {

UnitsNet/GeneratedCode/Extensions/Number/NumberToDurationExtensions.g.cs

+2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public static class NumberToDurationExtensions
102102
#region Month
103103

104104
/// <inheritdoc cref="Duration.FromMonths(UnitsNet.QuantityValue)" />
105+
[System.Obsolete("Use Month30 instead, which makes it clear that this is an approximate unit based on 30 days per month. The duration of a month varies, but the Gregorian solar calendar has 365.2425/12 = 30.44 days on average.")]
105106
public static Duration Months<T>(this T value) => Duration.FromMonths(Convert.ToDouble(value));
106107

107108
/// <inheritdoc cref="Duration.FromMonths(UnitsNet.QuantityValue)" />
@@ -157,6 +158,7 @@ public static class NumberToDurationExtensions
157158
#region Year
158159

159160
/// <inheritdoc cref="Duration.FromYears(UnitsNet.QuantityValue)" />
161+
[System.Obsolete("Use Year365 instead, which makes it clear that this is an approximate unit based on 365 days per year. The duration of a year varies due to corrections such as leap years, since a Gregorian solar calendar has 365.2425 days.")]
160162
public static Duration Years<T>(this T value) => Duration.FromYears(Convert.ToDouble(value));
161163

162164
/// <inheritdoc cref="Duration.FromYears(UnitsNet.QuantityValue)" />

0 commit comments

Comments
 (0)