style: run code cleanup & apply VS suggestions

This commit is contained in:
Andrew Welker
2025-03-25 22:14:15 -05:00
parent 4d98191fa7
commit 789111cb9a
64 changed files with 329 additions and 390 deletions

View File

@@ -3,12 +3,11 @@ using Newtonsoft.Json.Linq;
using PepperDash.Core;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace PepperDash.Essentials.AppServer.Messengers
{
public static class PressAndHoldHandler
{
{
private const long ButtonHeartbeatInterval = 1000;
private static readonly Dictionary<string, CTimer> _pushedActions = new Dictionary<string, CTimer>();
@@ -54,7 +53,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
private static void ResetTimer(string deviceKey, Action<bool> action)
{
Debug.LogMessage(Serilog.Events.LogEventLevel.Debug, "Attempting to reset timer for {deviceKey}", deviceKey);
if (!_pushedActions.TryGetValue(deviceKey, out CTimer cancelTimer))
{
Debug.LogMessage(Serilog.Events.LogEventLevel.Debug, "Timer for {deviceKey} not found", deviceKey);
@@ -70,7 +69,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
{
Debug.LogMessage(Serilog.Events.LogEventLevel.Debug, "Attempting to stop timer for {deviceKey}", deviceKey);
if (!_pushedActions.TryGetValue(deviceKey, out CTimer cancelTimer)) {
if (!_pushedActions.TryGetValue(deviceKey, out CTimer cancelTimer))
{
Debug.LogMessage(Serilog.Events.LogEventLevel.Debug, "Timer for {deviceKey} not found", deviceKey);
return;
}
@@ -110,7 +110,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
return;
}
timerHandler(deviceKey, action);
timerHandler(deviceKey, action);
}
}
}