fix: use correct line endings for verbatim strings

This commit is contained in:
Andrew Welker 2025-08-06 08:55:08 -05:00 committed by Neil Dorin
parent 5d90fafbd7
commit 3feab2593d
4 changed files with 142 additions and 150 deletions

View file

@ -1,8 +1,7 @@
extern alias NewtonsoftJson; extern alias NewtonsoftJson;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Crestron.SimplSharp; using Crestron.SimplSharp;
@ -111,6 +110,8 @@ public static class Debug
/// </summary> /// </summary>
private static bool _excludeAllMode; private static bool _excludeAllMode;
//static bool ExcludeNoKeyMessages;
private static readonly Dictionary<string, object> IncludedExcludedKeys; private static readonly Dictionary<string, object> IncludedExcludedKeys;
private static readonly LoggerConfiguration _defaultLoggerConfiguration; private static readonly LoggerConfiguration _defaultLoggerConfiguration;
@ -270,7 +271,8 @@ public static class Debug
} }
return (LogEventLevel)logLevel; return (LogEventLevel)logLevel;
} catch (Exception ex) }
catch (Exception ex)
{ {
CrestronConsole.PrintLine($"Exception retrieving log level for {levelStoreKey}: {ex.Message}"); CrestronConsole.PrintLine($"Exception retrieving log level for {levelStoreKey}: {ex.Message}");
return LogEventLevel.Information; return LogEventLevel.Information;
@ -330,13 +332,13 @@ public static class Debug
if (levelString.Trim() == "?") if (levelString.Trim() == "?")
{ {
CrestronConsole.ConsoleCommandResponse( CrestronConsole.ConsoleCommandResponse(
$@"Used to set the minimum level of debug messages to be printed to the console: "Used to set the minimum level of debug messages to be printed to the console:\r\n" +
{_logLevels[0]} = 0 $"{_logLevels[0]} = 0\r\n" +
{_logLevels[1]} = 1 $"{_logLevels[1]} = 1\r\n" +
{_logLevels[2]} = 2 $"{_logLevels[2]} = 2\r\n" +
{_logLevels[3]} = 3 $"{_logLevels[3]} = 3\r\n" +
{_logLevels[4]} = 4 $"{_logLevels[4]} = 4\r\n" +
{_logLevels[5]} = 5"); $"{_logLevels[5]} = 5");
return; return;
} }

View file

@ -55,11 +55,6 @@
<PackageReference Include="SSH.NET" Version="2025.0.0" /> <PackageReference Include="SSH.NET" Version="2025.0.0" />
<PackageReference Include="WebSocketSharp-netstandard" Version="1.0.1" /> <PackageReference Include="WebSocketSharp-netstandard" Version="1.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6'">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3">
<Aliases>global,NewtonsoftJson</Aliases>
</PackageReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Comm\._GenericSshClient.cs" /> <Compile Remove="Comm\._GenericSshClient.cs" />
<Compile Remove="Comm\._GenericTcpIpClient.cs" /> <Compile Remove="Comm\._GenericTcpIpClient.cs" />

View file

@ -461,9 +461,9 @@ public static class DeviceManager
if (String.IsNullOrEmpty(s) || s.Contains("?")) if (String.IsNullOrEmpty(s) || s.Contains("?"))
{ {
CrestronConsole.ConsoleCommandResponse( CrestronConsole.ConsoleCommandResponse(
@"SETDEVICESTREAMDEBUG [{deviceKey}] [OFF |TX | RX | BOTH] [timeOutInMinutes] "SETDEVICESTREAMDEBUG [{deviceKey}] [OFF |TX | RX | BOTH] [timeOutInMinutes]\r\n" +
{deviceKey} [OFF | TX | RX | BOTH] - Device to set stream debugging on, and which setting to use " {deviceKey} [OFF | TX | RX | BOTH] - Device to set stream debugging on, and which setting to use\r\n" +
timeOutInMinutes - Set timeout for stream debugging. Default is 30 minutes"); " timeOutInMinutes - Set timeout for stream debugging. Default is 30 minutes");
return; return;
} }

View file

@ -2,6 +2,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
@ -10,15 +11,9 @@ using Newtonsoft.Json.Linq;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
using Serilog.Events; using Serilog.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel.DataAnnotations;
using System.IO;
namespace PepperDash.Essentials.Core; namespace PepperDash.Essentials.Core;
/// <summary> /// <summary>
/// Provides functionality for managing and registering device factories, including loading plugin-based factories and /// Provides functionality for managing and registering device factories, including loading plugin-based factories and
/// retrieving devices based on their configuration. /// retrieving devices based on their configuration.
@ -253,9 +248,9 @@ public class DeviceFactory
} }
CrestronConsole.ConsoleCommandResponse( CrestronConsole.ConsoleCommandResponse(
@"Type: '{0}' "Type: '{0}'\r\n" +
Type: '{1}' " Type: '{1}'\r\n" +
Description: {2}{3}", type.Key, Type, description, CrestronEnvironment.NewLine); " Description: {2}{3}", type.Key, Type, description, CrestronEnvironment.NewLine);
} }
} }