Begin work on outlining dynamic side
This commit is contained in:
15
PkmnLib.Dynamic/StaticHelpers.cs
Normal file
15
PkmnLib.Dynamic/StaticHelpers.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace PkmnLib.Dynamic;
|
||||
|
||||
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>
|
||||
public static Func<DateTime> DateTimeProvider { get; set; } = () => DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Get the current date and time.
|
||||
/// </summary>
|
||||
public static DateTime GetCurrentDateTime() => DateTimeProvider();
|
||||
}
|
||||
Reference in New Issue
Block a user