2024-07-27 14:26:45 +00:00
|
|
|
namespace PkmnLib.Dynamic;
|
|
|
|
|
2024-07-28 10:52:17 +00:00
|
|
|
/// <summary>
|
|
|
|
/// A static helper class that contains functions that are used in multiple places.
|
|
|
|
/// </summary>
|
2024-07-27 14:26:45 +00:00
|
|
|
public static class StaticHelpers
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// A function to get the current date and time. This can be replaced in cases where the date and time
|
|
|
|
/// may not be the same as the system time.
|
|
|
|
/// </summary>
|
2024-12-27 14:53:11 +00:00
|
|
|
public static Func<DateTimeOffset> DateTimeProvider { get; set; } = () => DateTimeOffset.Now;
|
2025-03-02 16:19:57 +00:00
|
|
|
|
2024-07-27 14:26:45 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Get the current date and time.
|
|
|
|
/// </summary>
|
2024-12-27 14:53:11 +00:00
|
|
|
public static DateTimeOffset GetCurrentDateTime() => DateTimeProvider();
|
2024-07-27 14:26:45 +00:00
|
|
|
}
|