From aa0e4b707c3a4dfa119151a08048a10a300f9256 Mon Sep 17 00:00:00 2001 From: Nick Genovese Date: Wed, 8 Nov 2023 10:27:31 -0500 Subject: [PATCH] fix: removed Newtonsoft.JSON full and aliases --- .../Comm/ControlPropertiesConfig.cs | 9 ++------- .../Comm/GenericSecureTcpIpServer.cs | 11 ++++------- src/Pepperdash Core/Comm/GenericTcpIpClient.cs | 6 ++---- src/Pepperdash Core/Comm/GenericTcpIpServer.cs | 11 ++++------- src/Pepperdash Core/Comm/GenericUdpServer.cs | 12 ++---------- src/Pepperdash Core/Comm/TcpClientConfigObject.cs | 4 +--- src/Pepperdash Core/CommunicationExtras.cs | 5 +---- src/Pepperdash Core/Config/PortalConfigReader.cs | 12 +++--------- src/Pepperdash Core/EthernetHelper.cs | 10 ++-------- .../JsonStandardObjects/JsonToSimplDevice.cs | 7 +------ .../JsonToSimpl/JsonToSimplArrayLookupChild.cs | 9 ++------- .../JsonToSimpl/JsonToSimplChildObjectBase.cs | 8 ++------ .../JsonToSimpl/JsonToSimplFileMaster.cs | 7 ++----- .../JsonToSimpl/JsonToSimplFixedPathObject.cs | 12 +----------- .../JsonToSimpl/JsonToSimplGenericMaster.cs | 6 ++---- .../JsonToSimpl/JsonToSimplMaster.cs | 15 +++++---------- .../JsonToSimpl/JsonToSimplPortalFileMaster.cs | 10 ++-------- src/Pepperdash Core/Logging/Debug.cs | 5 ++--- src/Pepperdash Core/Logging/DebugContext.cs | 9 ++------- src/Pepperdash Core/Logging/DebugMemory.cs | 7 ++----- .../PasswordManagement/PasswordManager.cs | 10 +--------- src/Pepperdash Core/PepperDash_Core.csproj | 5 +---- src/Pepperdash Core/WebApi/Presets/Preset.cs | 11 +---------- .../WebApi/Presets/WebApiPasscodeClient.cs | 12 +++--------- 24 files changed, 50 insertions(+), 163 deletions(-) diff --git a/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs b/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs index 7bb7557..f342f25 100644 --- a/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs +++ b/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs @@ -1,11 +1,6 @@ -extern alias Full; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System; using Crestron.SimplSharp; -using Full.Newtonsoft.Json; +using Newtonsoft.Json; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/Comm/GenericSecureTcpIpServer.cs b/src/Pepperdash Core/Comm/GenericSecureTcpIpServer.cs index f00d030..06b7165 100644 --- a/src/Pepperdash Core/Comm/GenericSecureTcpIpServer.cs +++ b/src/Pepperdash Core/Comm/GenericSecureTcpIpServer.cs @@ -3,21 +3,18 @@ Copyright: 2017 ------------------------------------ ***Notice of Ownership and Copyright*** -The material in which this notice appears is the property of PepperDash Technology Corporation, -which claims copyright under the laws of the United States of America in the entire body of material -and in all parts thereof, regardless of the use to which it is being put. Any use, in whole or in part, -of this material by another party without the express written permission of PepperDash Technology Corporation is prohibited. +The material in which this notice appears is the property of PepperDash Technology Corporation, +which claims copyright under the laws of the United States of America in the entire body of material +and in all parts thereof, regardless of the use to which it is being put. Any use, in whole or in part, +of this material by another party without the express written permission of PepperDash Technology Corporation is prohibited. PepperDash Technology Corporation reserves all rights under applicable laws. ------------------------------------ */ -extern alias Full; using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronSockets; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/Comm/GenericTcpIpClient.cs b/src/Pepperdash Core/Comm/GenericTcpIpClient.cs index f77d06f..e5f53b9 100644 --- a/src/Pepperdash Core/Comm/GenericTcpIpClient.cs +++ b/src/Pepperdash Core/Comm/GenericTcpIpClient.cs @@ -1,12 +1,10 @@ -extern alias Full; -using System; -using System.Collections.Generic; +using System; using System.Linq; using System.Text; using System.Text.RegularExpressions; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronSockets; -using Full.Newtonsoft.Json; +using Newtonsoft.Json; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/Comm/GenericTcpIpServer.cs b/src/Pepperdash Core/Comm/GenericTcpIpServer.cs index f77a71c..680db5c 100644 --- a/src/Pepperdash Core/Comm/GenericTcpIpServer.cs +++ b/src/Pepperdash Core/Comm/GenericTcpIpServer.cs @@ -3,21 +3,18 @@ Copyright: 2017 ------------------------------------ ***Notice of Ownership and Copyright*** -The material in which this notice appears is the property of PepperDash Technology Corporation, -which claims copyright under the laws of the United States of America in the entire body of material -and in all parts thereof, regardless of the use to which it is being put. Any use, in whole or in part, -of this material by another party without the express written permission of PepperDash Technology Corporation is prohibited. +The material in which this notice appears is the property of PepperDash Technology Corporation, +which claims copyright under the laws of the United States of America in the entire body of material +and in all parts thereof, regardless of the use to which it is being put. Any use, in whole or in part, +of this material by another party without the express written permission of PepperDash Technology Corporation is prohibited. PepperDash Technology Corporation reserves all rights under applicable laws. ------------------------------------ */ -extern alias Full; using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronSockets; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/Comm/GenericUdpServer.cs b/src/Pepperdash Core/Comm/GenericUdpServer.cs index e1daeb2..e31c581 100644 --- a/src/Pepperdash Core/Comm/GenericUdpServer.cs +++ b/src/Pepperdash Core/Comm/GenericUdpServer.cs @@ -1,19 +1,11 @@ -extern alias Full; + using System; -using System.Collections.Generic; using System.Linq; using System.Text; -using System.Text.RegularExpressions; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronSockets; - - -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; - - - +using Newtonsoft.Json; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/Comm/TcpClientConfigObject.cs b/src/Pepperdash Core/Comm/TcpClientConfigObject.cs index 5c71a50..c3b3bce 100644 --- a/src/Pepperdash Core/Comm/TcpClientConfigObject.cs +++ b/src/Pepperdash Core/Comm/TcpClientConfigObject.cs @@ -1,6 +1,4 @@ -extern alias Full; - -using Full.Newtonsoft.Json; +using Newtonsoft.Json; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/CommunicationExtras.cs b/src/Pepperdash Core/CommunicationExtras.cs index 79a6b9a..e780efd 100644 --- a/src/Pepperdash Core/CommunicationExtras.cs +++ b/src/Pepperdash Core/CommunicationExtras.cs @@ -1,13 +1,10 @@ -extern alias Full; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronSockets; using System.Text.RegularExpressions; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/Config/PortalConfigReader.cs b/src/Pepperdash Core/Config/PortalConfigReader.cs index 803875f..a75f17d 100644 --- a/src/Pepperdash Core/Config/PortalConfigReader.cs +++ b/src/Pepperdash Core/Config/PortalConfigReader.cs @@ -1,15 +1,9 @@ -extern alias Full; - -using System; -using System.Collections.Generic; +using System; using System.Linq; -using System.Text; - -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; - +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using PepperDash.Core; namespace PepperDash.Core.Config diff --git a/src/Pepperdash Core/EthernetHelper.cs b/src/Pepperdash Core/EthernetHelper.cs index 5e02540..0ccc50a 100644 --- a/src/Pepperdash Core/EthernetHelper.cs +++ b/src/Pepperdash Core/EthernetHelper.cs @@ -1,11 +1,5 @@ -extern alias Full; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using Full.Newtonsoft.Json; +using Crestron.SimplSharp; +using Newtonsoft.Json; namespace PepperDash.Core { diff --git a/src/Pepperdash Core/JsonStandardObjects/JsonToSimplDevice.cs b/src/Pepperdash Core/JsonStandardObjects/JsonToSimplDevice.cs index e0486fa..8e3fe15 100644 --- a/src/Pepperdash Core/JsonStandardObjects/JsonToSimplDevice.cs +++ b/src/Pepperdash Core/JsonStandardObjects/JsonToSimplDevice.cs @@ -1,11 +1,6 @@ -extern alias Full; -using System; -using System.Collections.Generic; +using System; using System.Linq; -using System.Text; using Crestron.SimplSharp; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; using PepperDash.Core.JsonToSimpl; namespace PepperDash.Core.JsonStandardObjects diff --git a/src/Pepperdash Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs b/src/Pepperdash Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs index b462b58..5acc110 100644 --- a/src/Pepperdash Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs +++ b/src/Pepperdash Core/JsonToSimpl/JsonToSimplArrayLookupChild.cs @@ -1,11 +1,6 @@ -extern alias Full; -using System; -using System.Collections.Generic; +using System; using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; +using Newtonsoft.Json.Linq; namespace PepperDash.Core.JsonToSimpl { diff --git a/src/Pepperdash Core/JsonToSimpl/JsonToSimplChildObjectBase.cs b/src/Pepperdash Core/JsonToSimpl/JsonToSimplChildObjectBase.cs index a7a32b2..5aa67c9 100644 --- a/src/Pepperdash Core/JsonToSimpl/JsonToSimplChildObjectBase.cs +++ b/src/Pepperdash Core/JsonToSimpl/JsonToSimplChildObjectBase.cs @@ -1,11 +1,7 @@ -extern alias Full; -using System; +using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; +using Newtonsoft.Json.Linq; namespace PepperDash.Core.JsonToSimpl { diff --git a/src/Pepperdash Core/JsonToSimpl/JsonToSimplFileMaster.cs b/src/Pepperdash Core/JsonToSimpl/JsonToSimplFileMaster.cs index 521cecc..84762b9 100644 --- a/src/Pepperdash Core/JsonToSimpl/JsonToSimplFileMaster.cs +++ b/src/Pepperdash Core/JsonToSimpl/JsonToSimplFileMaster.cs @@ -1,14 +1,11 @@ -extern alias Full; -using System; -//using System.IO; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; +using Newtonsoft.Json.Linq; namespace PepperDash.Core.JsonToSimpl { diff --git a/src/Pepperdash Core/JsonToSimpl/JsonToSimplFixedPathObject.cs b/src/Pepperdash Core/JsonToSimpl/JsonToSimplFixedPathObject.cs index 1ad0cd3..3e69ed9 100644 --- a/src/Pepperdash Core/JsonToSimpl/JsonToSimplFixedPathObject.cs +++ b/src/Pepperdash Core/JsonToSimpl/JsonToSimplFixedPathObject.cs @@ -1,14 +1,4 @@ -extern alias Full; - -using System; -//using System.IO; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; + namespace PepperDash.Core.JsonToSimpl { diff --git a/src/Pepperdash Core/JsonToSimpl/JsonToSimplGenericMaster.cs b/src/Pepperdash Core/JsonToSimpl/JsonToSimplGenericMaster.cs index d9b201d..e0f42f8 100644 --- a/src/Pepperdash Core/JsonToSimpl/JsonToSimplGenericMaster.cs +++ b/src/Pepperdash Core/JsonToSimpl/JsonToSimplGenericMaster.cs @@ -1,9 +1,7 @@ -extern alias Full; - -using System; +using System; using System.Collections.Generic; using Crestron.SimplSharp; -using Full.Newtonsoft.Json.Linq; +using Newtonsoft.Json.Linq; namespace PepperDash.Core.JsonToSimpl { diff --git a/src/Pepperdash Core/JsonToSimpl/JsonToSimplMaster.cs b/src/Pepperdash Core/JsonToSimpl/JsonToSimplMaster.cs index ab13429..d531d18 100644 --- a/src/Pepperdash Core/JsonToSimpl/JsonToSimplMaster.cs +++ b/src/Pepperdash Core/JsonToSimpl/JsonToSimplMaster.cs @@ -1,14 +1,9 @@ -extern alias Full; - -using System; -//using System.IO; +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace PepperDash.Core.JsonToSimpl { @@ -164,7 +159,7 @@ public static class JsonFixes /// public static JObject ParseObject(string json) { - using (var reader = new JsonTextReader(new System.IO.StringReader(json))) + using (var reader = new JsonTextReader(new StringReader(json))) { var startDepth = reader.Depth; var obj = JObject.Load(reader); @@ -181,7 +176,7 @@ public static JObject ParseObject(string json) /// public static JArray ParseArray(string json) { - using (var reader = new JsonTextReader(new System.IO.StringReader(json))) + using (var reader = new JsonTextReader(new StringReader(json))) { var startDepth = reader.Depth; var obj = JArray.Load(reader); diff --git a/src/Pepperdash Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs b/src/Pepperdash Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs index 8a85b33..1c3edb3 100644 --- a/src/Pepperdash Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs +++ b/src/Pepperdash Core/JsonToSimpl/JsonToSimplPortalFileMaster.cs @@ -1,15 +1,9 @@ -extern alias Full; - -using System; -//using System.IO; +using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; - +using Newtonsoft.Json.Linq; using PepperDash.Core.Config; namespace PepperDash.Core.JsonToSimpl diff --git a/src/Pepperdash Core/Logging/Debug.cs b/src/Pepperdash Core/Logging/Debug.cs index a0af198..aee3ec1 100644 --- a/src/Pepperdash Core/Logging/Debug.cs +++ b/src/Pepperdash Core/Logging/Debug.cs @@ -1,12 +1,11 @@ -extern alias Full; -using System; +using System; using System.Collections.Generic; using System.Text.RegularExpressions; using Crestron.SimplSharp; using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.CrestronLogger; using Crestron.SimplSharp.CrestronIO; -using Full.Newtonsoft.Json; +using Newtonsoft.Json; using PepperDash.Core.DebugThings; diff --git a/src/Pepperdash Core/Logging/DebugContext.cs b/src/Pepperdash Core/Logging/DebugContext.cs index 3d7e7bb..54c8741 100644 --- a/src/Pepperdash Core/Logging/DebugContext.cs +++ b/src/Pepperdash Core/Logging/DebugContext.cs @@ -1,14 +1,9 @@ -extern alias Full; - -using System; +using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronDataStore; using Crestron.SimplSharp.CrestronIO; -using Full.Newtonsoft.Json; -using PepperDash.Core.DebugThings; +using Newtonsoft.Json; namespace PepperDash.Core diff --git a/src/Pepperdash Core/Logging/DebugMemory.cs b/src/Pepperdash Core/Logging/DebugMemory.cs index 6bb3dbb..68235e4 100644 --- a/src/Pepperdash Core/Logging/DebugMemory.cs +++ b/src/Pepperdash Core/Logging/DebugMemory.cs @@ -1,9 +1,6 @@ -extern alias Full; - -using System.Collections.Generic; +using System.Collections.Generic; using Crestron.SimplSharp; - -using Full.Newtonsoft.Json; +using Newtonsoft.Json; namespace PepperDash.Core.DebugThings { diff --git a/src/Pepperdash Core/PasswordManagement/PasswordManager.cs b/src/Pepperdash Core/PasswordManagement/PasswordManager.cs index 594e70e..d15ac1e 100644 --- a/src/Pepperdash Core/PasswordManagement/PasswordManager.cs +++ b/src/Pepperdash Core/PasswordManagement/PasswordManager.cs @@ -1,14 +1,6 @@ -extern alias Full; - -using System; +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; using Crestron.SimplSharp; -using PepperDash.Core.JsonToSimpl; -using PepperDash.Core.JsonStandardObjects; namespace PepperDash.Core.PasswordManagement { diff --git a/src/Pepperdash Core/PepperDash_Core.csproj b/src/Pepperdash Core/PepperDash_Core.csproj index 845577b..9989152 100644 --- a/src/Pepperdash Core/PepperDash_Core.csproj +++ b/src/Pepperdash Core/PepperDash_Core.csproj @@ -30,10 +30,7 @@ - - - Full - + diff --git a/src/Pepperdash Core/WebApi/Presets/Preset.cs b/src/Pepperdash Core/WebApi/Presets/Preset.cs index 49e6427..bdbc582 100644 --- a/src/Pepperdash Core/WebApi/Presets/Preset.cs +++ b/src/Pepperdash Core/WebApi/Presets/Preset.cs @@ -1,13 +1,4 @@ -extern alias Full; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using Full.Newtonsoft.Json; - +using System; namespace PepperDash.Core.WebApi.Presets { diff --git a/src/Pepperdash Core/WebApi/Presets/WebApiPasscodeClient.cs b/src/Pepperdash Core/WebApi/Presets/WebApiPasscodeClient.cs index 3f178f8..0a9317b 100644 --- a/src/Pepperdash Core/WebApi/Presets/WebApiPasscodeClient.cs +++ b/src/Pepperdash Core/WebApi/Presets/WebApiPasscodeClient.cs @@ -1,16 +1,10 @@ -extern alias Full; - -using System; -using System.Text; +using System; using Crestron.SimplSharp; // For Basic SIMPL# Classes using Crestron.SimplSharp.CrestronIO; -using Crestron.SimplSharp.Net; using Crestron.SimplSharp.Net.Http; using Crestron.SimplSharp.Net.Https; -using Full.Newtonsoft.Json; -using Full.Newtonsoft.Json.Linq; - -using PepperDash.Core; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using PepperDash.Core.JsonToSimpl;