Remove PowerMonitor.Manager project and its dependencies
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
using PowerMonitorManager.Interface;
|
||||
using PowerMonitorManager.Models;
|
||||
|
||||
namespace PowerMonitorManager;
|
||||
|
||||
public sealed class OtherPowerCalculationService : IOtherPowerCalculationService
|
||||
{
|
||||
public PowerCalculationResult CalculateOtherPower(double? totalHomePower, IReadOnlyList<double?> monitoredSensorValues)
|
||||
{
|
||||
var total = totalHomePower ?? 0.0;
|
||||
var sumOfMonitored = monitoredSensorValues.Sum(v => v ?? 0.0);
|
||||
var otherPower = Math.Max(0.0, total - sumOfMonitored);
|
||||
|
||||
return new PowerCalculationResult(otherPower, sumOfMonitored);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user