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:
@@ -1,21 +1,22 @@
|
||||
using System.Reactive.Concurrency;
|
||||
using BatteryMonitor.Models;
|
||||
using BatteryMonitorManager.Interface;
|
||||
using BatteryMonitorManager.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NetDaemon.AppModel;
|
||||
using NetDaemon.Extensions.Scheduler;
|
||||
using BatteryMonitorManager.Interface;
|
||||
using BatteryMonitorManager.Models;
|
||||
|
||||
namespace BatteryMonitorManager;
|
||||
|
||||
[NetDaemonApp]
|
||||
public sealed class BatteryMonitorInit
|
||||
{
|
||||
private readonly ILogger<BatteryMonitorInit> _logger;
|
||||
private readonly IScheduler _scheduler;
|
||||
private readonly IBatterySensorDiscoveryService _discoveryService;
|
||||
private readonly ILogger<BatteryMonitorInit> _logger;
|
||||
private readonly IBatteryNotificationService _notificationService;
|
||||
private readonly BatteryMonitorOptions _options;
|
||||
private readonly IScheduler _scheduler;
|
||||
|
||||
public BatteryMonitorInit(
|
||||
ILogger<BatteryMonitorInit> logger,
|
||||
@@ -55,9 +56,8 @@ public sealed class BatteryMonitorInit
|
||||
CheckAndNotify();
|
||||
|
||||
if (_logger.IsEnabled(LogLevel.Information))
|
||||
{
|
||||
_logger.LogInformation("BatteryMonitor initialized with threshold {Threshold}%", _options.BatteryThresholdPercent);
|
||||
}
|
||||
_logger.LogInformation("BatteryMonitor initialized with threshold {Threshold}%",
|
||||
_options.BatteryThresholdPercent);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ public sealed class BatteryMonitorInit
|
||||
|
||||
private void ScheduleDailyCheck()
|
||||
{
|
||||
_scheduler.ScheduleCron(BatteryMonitor.Models.BatteryMonitorConsts.DailyCheckCron, () =>
|
||||
_scheduler.ScheduleCron(BatteryMonitorConsts.DailyCheckCron, () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -98,4 +98,4 @@ public sealed class BatteryMonitorInit
|
||||
_logger.LogDebug("No low battery devices found");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user