Apply code formatting cleanup across monitor projects
- Reindent appsettings.json and the MSBuild project files - Collapse single-statement guard blocks and tidy using and member order - Normalize XML doc indentation and file endings - Reorder BatteryMonitor test-data helpers and move the exclusion tests into their own region - Carry the same formatting through the boiler config, control, entity and test files
This commit is contained in:
@@ -9,11 +9,6 @@ public sealed class CostAccumulator(DateTime now)
|
||||
private double _costDaily;
|
||||
private double _costMonthly;
|
||||
|
||||
private double _previous15Min;
|
||||
private double _previous1Hour;
|
||||
private double _previousDaily;
|
||||
private double _previousMonthly;
|
||||
|
||||
private DateTime _last15MinReset = now;
|
||||
private DateTime _last1HourReset = now;
|
||||
private DateTime _lastDailyReset = now;
|
||||
@@ -21,6 +16,11 @@ public sealed class CostAccumulator(DateTime now)
|
||||
|
||||
private bool _partialWindow = true;
|
||||
|
||||
private double _previous15Min;
|
||||
private double _previous1Hour;
|
||||
private double _previousDaily;
|
||||
private double _previousMonthly;
|
||||
|
||||
public void AddCost(double costIncrement, DateTime now)
|
||||
{
|
||||
lock (_lock)
|
||||
@@ -77,10 +77,7 @@ public sealed class CostAccumulator(DateTime now)
|
||||
_lastDailyReset = now;
|
||||
}
|
||||
|
||||
if (!IsNewMonthWindow(now, _lastMonthlyReset))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!IsNewMonthWindow(now, _lastMonthlyReset)) return;
|
||||
|
||||
_previousMonthly = _costMonthly;
|
||||
_costMonthly = 0;
|
||||
@@ -108,4 +105,4 @@ public sealed class CostAccumulator(DateTime now)
|
||||
{
|
||||
return now.Year != lastReset.Year || now.Month != lastReset.Month;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user