Init
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using NordPoolManager.Models;
|
||||
|
||||
namespace NordPoolManager.Interface;
|
||||
|
||||
public interface IBoilerControlService
|
||||
{
|
||||
BoilerAction DetermineAction(bool isNowCheap, bool waterReady, string? currentSwitchState);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using NordPool.Models;
|
||||
|
||||
namespace NordPoolManager.Interface;
|
||||
|
||||
public interface ICheapestIntervalsFinder
|
||||
{
|
||||
IReadOnlyList<CheapestIntervalResult> FindCheapestIntervals(NordPoolPrice prices, int numberOfIntervals, double priceCap, DateTime deadline);
|
||||
|
||||
bool IsCurrentIntervalCheap(IReadOnlyList<CheapestIntervalResult> cheapestIntervals, DateTime utcNow);
|
||||
|
||||
bool IsWaterReady(string? switchState, double? powerWatts);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using NordPoolManager.Models;
|
||||
|
||||
namespace NordPoolManager.Interface;
|
||||
|
||||
public interface INordPoolEntityService
|
||||
{
|
||||
Task CreateEntitiesAsync(string? unitOfMeasurement);
|
||||
Task ResetEntitiesAsync();
|
||||
Task UpdateEntitiesAsync(EntityUpdateContext context);
|
||||
Task CleanupEntitiesAsync();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace NordPoolManager.Interface;
|
||||
|
||||
public interface INordPoolInit
|
||||
{
|
||||
Task InitializeAsync();
|
||||
Task CleanupEntitiesAsync();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using NordPool.Models;
|
||||
|
||||
namespace NordPoolManager.Interface;
|
||||
|
||||
public interface INordPoolPriceService
|
||||
{
|
||||
NordPoolPrice? TodayNordPoolPrice { get; }
|
||||
NordPoolPrice? TomorrowNordPoolPrice { get; }
|
||||
double CurrentPrice { get; }
|
||||
int DayQuartersIndex { get; }
|
||||
DateTime? LastUpdatedDate { get; }
|
||||
DateOnly? LastFetchedDate { get; }
|
||||
|
||||
Task FetchPricesAsync();
|
||||
double UpdateCurrentPrice();
|
||||
bool ShouldFetchNewPrices(DateOnly today);
|
||||
void RollOverPrices(DateOnly today);
|
||||
}
|
||||
Reference in New Issue
Block a user