mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 00:35:42 +00:00
🔥 Remove obsolete methods
This commit is contained in:
parent
7b06abc253
commit
ba2e34a755
@ -126,69 +126,5 @@
|
||||
DateTimeOffset offset = time;
|
||||
return useMillis ? offset.ToUnixTimeMilliseconds() : offset.ToUnixTimeSeconds();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <see cref="DateTime"/> with the year set to the provided value.
|
||||
/// </summary>
|
||||
/// <param name="date">The <see cref="DateTime"/> to copy.</param>
|
||||
/// <param name="year">The year to set.</param>
|
||||
/// <returns>Returns a <see cref="DateTime"/>.</returns>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime WithYear(this DateTime date, int year)
|
||||
{
|
||||
return new DateTime(year, date.Month, date.Day, date.Hour, date.Minute, date.Second, date.Millisecond);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the time of the current date with minute precision.
|
||||
/// </summary>
|
||||
/// <param name="current">The current date.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime WithTime(this DateTime current, int hour, int minute)
|
||||
{
|
||||
return current.WithTime(hour, minute, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the time of the current date with second precision.
|
||||
/// </summary>
|
||||
/// <param name="current">The current date</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime WithTime(this DateTime current, int hour, int minute, int second)
|
||||
{
|
||||
return current.WithTime(hour, minute, second, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the time of the current date with millisecond precision.
|
||||
/// </summary>
|
||||
/// <param name="current">The current date.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
/// <param name="millisecond">The millisecond.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime WithTime(this DateTime current, int hour, int minute, int second, int millisecond)
|
||||
{
|
||||
return new DateTime(current.Year, current.Month, current.Day, hour, minute, second, millisecond);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,116 +7,6 @@
|
||||
/// </summary>
|
||||
public static class Int16Extensions
|
||||
{
|
||||
// TODO change
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Days(this ushort number)
|
||||
{
|
||||
return TimeSpan.FromDays(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Hours(this ushort number)
|
||||
{
|
||||
return TimeSpan.FromHours(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Milliseconds(this ushort number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Minutes(this ushort number)
|
||||
{
|
||||
return TimeSpan.FromMinutes(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Seconds(this ushort number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Ticks(this ushort number)
|
||||
{
|
||||
return TimeSpan.FromTicks(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Days(this short number)
|
||||
{
|
||||
return TimeSpan.FromDays(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Hours(this short number)
|
||||
{
|
||||
return TimeSpan.FromHours(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Milliseconds(this short number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Minutes(this short number)
|
||||
{
|
||||
return TimeSpan.FromMinutes(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Seconds(this short number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Ticks(this short number)
|
||||
{
|
||||
return TimeSpan.FromTicks(number);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clamps a value between a minimum and a maximum value.
|
||||
/// </summary>
|
||||
|
@ -7,316 +7,6 @@
|
||||
/// </summary>
|
||||
public static class Int32Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is January.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime January(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 1, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is February.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime February(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 2, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is March.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime March(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 3, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is April.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime April(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 4, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is May.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime May(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 5, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is June.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime June(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 6, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is July.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
public static DateTime July(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 7, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is August.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime August(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 8, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is September.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime September(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 9, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is October.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime October(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 10, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is November.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime November(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 11, day, hour, minute, second);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="DateTime"/> where the month is December.
|
||||
/// </summary>
|
||||
/// <param name="day">The day of the month.</param>
|
||||
/// <param name="year">The year.</param>
|
||||
/// <param name="hour">The hour.</param>
|
||||
/// <param name="minute">The minute.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static DateTime December(this int day, int year, int hour = 0, int minute = 0, int second = 0)
|
||||
{
|
||||
return new DateTime(year, 12, day, hour, minute, second);
|
||||
}
|
||||
|
||||
// TODO change
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Days(this uint number)
|
||||
{
|
||||
return TimeSpan.FromDays(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Hours(this uint number)
|
||||
{
|
||||
return TimeSpan.FromHours(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Milliseconds(this uint number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Minutes(this uint number)
|
||||
{
|
||||
return TimeSpan.FromMinutes(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Seconds(this uint number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Ticks(this uint number)
|
||||
{
|
||||
return TimeSpan.FromTicks(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Days(this int number)
|
||||
{
|
||||
return TimeSpan.FromDays(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Hours(this int number)
|
||||
{
|
||||
return TimeSpan.FromHours(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Milliseconds(this int number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Minutes(this int number)
|
||||
{
|
||||
return TimeSpan.FromMinutes(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Seconds(this int number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Ticks(this int number)
|
||||
{
|
||||
return TimeSpan.FromTicks(number);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clamps a value between a minimum and a maximum value.
|
||||
/// </summary>
|
||||
|
@ -7,107 +7,6 @@
|
||||
/// </summary>
|
||||
public static class Int64Extensions
|
||||
{
|
||||
// TODO change
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Days(this ulong number)
|
||||
{
|
||||
return TimeSpan.FromDays(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Hours(this ulong number)
|
||||
{
|
||||
return TimeSpan.FromHours(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Milliseconds(this ulong number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Minutes(this ulong number)
|
||||
{
|
||||
return TimeSpan.FromMinutes(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Seconds(this ulong number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Days(this long number)
|
||||
{
|
||||
return TimeSpan.FromDays(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Hours(this long number)
|
||||
{
|
||||
return TimeSpan.FromHours(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Milliseconds(this long number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Minutes(this long number)
|
||||
{
|
||||
return TimeSpan.FromMinutes(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Seconds(this long number)
|
||||
{
|
||||
return TimeSpan.FromSeconds(number);
|
||||
}
|
||||
|
||||
[Obsolete(
|
||||
"This method has been deprecated in favor of Humanizer's fluent DateTime API. " +
|
||||
"Please consider downloading the Humanizer package for more stable implementations of this method."
|
||||
)]
|
||||
public static TimeSpan Ticks(this long number)
|
||||
{
|
||||
return TimeSpan.FromTicks(number);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clamps a value between a minimum and a maximum value.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user