Apply code formatting cleanup across the monitor projects

- Wrap using directives in `#region` blocks across the Battery, Boiler and NordPool sources and tests
- Expand single-statement guards and loops into braced blocks
- Realign wrapped method arguments, chained calls and continuations
- Replace target-typed `new()` with explicit generic construction and empty string literals with `string.Empty`
- Flatten the boiler config expression and reindent the remaining touched files
This commit is contained in:
2026-12-01 12:33:31 +02:00
parent 77458383d1
commit f919d6b25b
115 changed files with 3115 additions and 1959 deletions
+14 -10
View File
@@ -1,5 +1,9 @@
#region
using NordPool.Models;
#endregion
namespace NordPool.Manager.Tests;
/// <summary>
@@ -8,7 +12,7 @@ namespace NordPool.Manager.Tests;
/// </summary>
internal static class NordPoolTestData
{
public static readonly DateTime DayStart = new(2026, 3, 31, 0, 0, 0, DateTimeKind.Utc);
public static readonly DateTime DayStart = new DateTime(2026, 3, 31, 0, 0, 0, DateTimeKind.Utc);
/// <summary>
/// Builds a contiguous set of 15-minute intervals starting at <paramref name="dayStart" />.
@@ -23,12 +27,12 @@ internal static class NordPoolTestData
return
[
.. Enumerable.Range(0, count)
.Select(i => new NordPoolDayPrice
{
Start = start.AddMinutes(i * NordPoolConsts.MinutesPerInterval),
End = start.AddMinutes((i + 1) * NordPoolConsts.MinutesPerInterval),
Price = priceFactory(i)
})
.Select(i => new NordPoolDayPrice
{
Start = start.AddMinutes(i * NordPoolConsts.MinutesPerInterval),
End = start.AddMinutes((i + 1) * NordPoolConsts.MinutesPerInterval),
Price = priceFactory(i)
})
];
}
@@ -41,8 +45,8 @@ internal static class NordPoolTestData
var start = dayStart ?? DayStart;
return CreateIntervals(
NordPoolConsts.MaxDailyIntervals,
i => Math.Round(15.0 * Math.Sin(i / 6.0) + i % 8 - 2.0, 2),
start);
NordPoolConsts.MaxDailyIntervals,
i => Math.Round(15.0 * Math.Sin(i / 6.0) + i % 8 - 2.0, 2),
start);
}
}