chore: Added SimplSharp nuget packages, fixed SIMPLSHARP preprocessors

This commit is contained in:
Chris Cameron
2021-08-30 13:39:43 -04:00
parent 8f5fee2401
commit 67a2b11ee6
28 changed files with 145 additions and 66 deletions

View File

@@ -1,10 +1,15 @@
using System.Collections.Generic; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using ICD.Common.Utils.Extensions; using ICD.Common.Utils.Extensions;
using ICD.Common.Utils.IO; using ICD.Common.Utils.IO;
using Newtonsoft.Json;
using NUnit.Framework; using NUnit.Framework;
namespace ICD.Common.Utils.Tests.Extensions namespace ICD.Common.Utils.Tests.Extensions

View File

@@ -11,12 +11,12 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;STANDARD</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<OutputPath>binNetCoreApp\$(Configuration)\</OutputPath> <OutputPath>binNetCoreApp\$(Configuration)\</OutputPath>
<DefineConstants>TRACE;STANDARD</DefineConstants> <DefineConstants>TRACE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -26,6 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net472'" Include="Newtonsoft.Json" Version="13.0.1" Aliases="RealNewtonsoft"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="NUnit" Version="3.13.1" /> <PackageReference Include="NUnit" Version="3.13.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" /> <PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />

View File

@@ -1,6 +1,11 @@
using System; #if NETFRAMEWORK
using ICD.Common.Utils.Json; extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json; using Newtonsoft.Json;
#endif
using System;
using ICD.Common.Utils.Json;
using NUnit.Framework; using NUnit.Framework;
namespace ICD.Common.Utils.Tests.Json namespace ICD.Common.Utils.Tests.Json

View File

@@ -1,7 +1,12 @@
using ICD.Common.Utils.Extensions; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using ICD.Common.Utils.Extensions;
using ICD.Common.Utils.IO; using ICD.Common.Utils.IO;
using ICD.Common.Utils.Json; using ICD.Common.Utils.Json;
using Newtonsoft.Json;
using NUnit.Framework; using NUnit.Framework;
namespace ICD.Common.Utils.Tests.Json namespace ICD.Common.Utils.Tests.Json

View File

@@ -1,9 +1,8 @@
using System; using System;
#if STANDARD
using System.Net.Mail;
#endif
#if SIMPLSHARP #if SIMPLSHARP
using Crestron.SimplSharp; using Crestron.SimplSharp;
#else
using System.Net.Mail;
#endif #endif
namespace ICD.Common.Utils.Email namespace ICD.Common.Utils.Email
@@ -126,7 +125,7 @@ namespace ICD.Common.Utils.Email
public static class MailErrorCodeUtils public static class MailErrorCodeUtils
{ {
#if STANDARD #if !SIMPLSHARP
public static eMailErrorCode FromNetStandardMailCode(SmtpStatusCode code) public static eMailErrorCode FromNetStandardMailCode(SmtpStatusCode code)
{ {
switch (code) switch (code)
@@ -185,8 +184,7 @@ namespace ICD.Common.Utils.Email
throw new ArgumentOutOfRangeException(nameof(code), code, null); throw new ArgumentOutOfRangeException(nameof(code), code, null);
} }
} }
#endif #else
#if SIMPLSHARP
public static eMailErrorCode FromSimplMailCode(CrestronMailFunctions.SendMailErrorCodes code) public static eMailErrorCode FromSimplMailCode(CrestronMailFunctions.SendMailErrorCodes code)
{ {
switch (code) switch (code)

View File

@@ -29,7 +29,7 @@ namespace ICD.Common.Utils.Extensions
#endif #endif
.CodeBase; .CodeBase;
#if STANDARD #if !SIMPLSHARP
if (string.IsNullOrEmpty(path)) if (string.IsNullOrEmpty(path))
path = extends.Location; path = extends.Location;
#endif #endif

View File

@@ -1,7 +1,12 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using System;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using ICD.Common.Properties; using ICD.Common.Properties;
using Newtonsoft.Json;
namespace ICD.Common.Utils.Extensions namespace ICD.Common.Utils.Extensions
{ {

View File

@@ -1,8 +1,13 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using ICD.Common.Properties; using ICD.Common.Properties;
using Newtonsoft.Json;
namespace ICD.Common.Utils.Extensions namespace ICD.Common.Utils.Extensions
{ {

View File

@@ -1,5 +1,10 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json; using Newtonsoft.Json;
#endif
using System;
namespace ICD.Common.Utils.Extensions namespace ICD.Common.Utils.Extensions
{ {

View File

@@ -1,6 +1,11 @@
using System; #if NETFRAMEWORK
using ICD.Common.Properties; extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json; using Newtonsoft.Json;
#endif
using System;
using ICD.Common.Properties;
namespace ICD.Common.Utils.Extensions namespace ICD.Common.Utils.Extensions
{ {

View File

@@ -5,24 +5,19 @@
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks> <TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
<AssemblyName>ICD.Common.Utils</AssemblyName> <AssemblyName>ICD.Common.Utils</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace> <RootNamespace>ICD.Common.Utils</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<Authors>Chris Cameron, Jeff Thompson</Authors>
<PackageId>ICD.Common.Utils</PackageId>
<PackageProjectUrl></PackageProjectUrl>
<RepositoryUrl>https://cs-gogs.icdpf.net/Common/Utils</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<EazfuscatorIntegration>MSBuild</EazfuscatorIntegration> <EazfuscatorIntegration>MSBuild</EazfuscatorIntegration>
<EazfuscatorActiveConfiguration>Release</EazfuscatorActiveConfiguration> <EazfuscatorActiveConfiguration>Release</EazfuscatorActiveConfiguration>
<EazfuscatorCompatibilityVersion>2018.2</EazfuscatorCompatibilityVersion> <EazfuscatorCompatibilityVersion>2018.2</EazfuscatorCompatibilityVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;STANDARD</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<OutputPath>binNetCoreApp\$(Configuration)\</OutputPath> <OutputPath>binNetCoreApp\$(Configuration)\</OutputPath>
<DefineConstants>TRACE;STANDARD</DefineConstants> <DefineConstants>TRACE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="binNetCoreApp\**" /> <Compile Remove="binNetCoreApp\**" />
@@ -39,10 +34,12 @@
<None Remove="Properties\ControlSystem.cfg" /> <None Remove="Properties\ControlSystem.cfg" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net472'" Include="Crestron.SimplSharp.SDK.Library" Version="2.14.182" />
<PackageReference Condition="'$(TargetFramework)' == 'net472'" Include="Newtonsoft.Json" Version="13.0.1" Aliases="RealNewtonsoft"/>
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="Newtonsoft.Json" Version="13.0.1"/>
<PackageReference Include="Microsoft.Data.SQLite" Version="5.0.4" /> <PackageReference Include="Microsoft.Data.SQLite" Version="5.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" /> <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Pastel" Version="2.1.0" /> <PackageReference Include="Pastel" Version="2.1.0" />
<PackageReference Include="System.Management" Version="5.0.0" /> <PackageReference Include="System.Management" Version="5.0.0" />
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" /> <PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
@@ -57,5 +54,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -30,7 +30,7 @@ namespace ICD.Common.Utils.IO
#if SIMPLSHARP #if SIMPLSHARP
return Directory.GetApplicationRootDirectory(); return Directory.GetApplicationRootDirectory();
#else #else
return Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetPath()); return Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetPath());
#endif #endif
} }

View File

@@ -127,7 +127,7 @@ namespace ICD.Common.Utils.IO
File.Move(sourceFileName, destFileName); File.Move(sourceFileName, destFileName);
} }
#if STANDARD #if !SIMPLSHARP
public static void SetAttributes(string path, FileAttributes attributes, bool recursive) public static void SetAttributes(string path, FileAttributes attributes, bool recursive)
{ {
File.SetAttributes(path, attributes); File.SetAttributes(path, attributes);

View File

@@ -1,7 +1,7 @@
using System; using System;
#if SIMPLSHARP #if SIMPLSHARP
using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharp.CrestronIO;
#elif STANDARD #else
using System.IO; using System.IO;
#endif #endif

View File

@@ -1,6 +1,6 @@
#if SIMPLSHARP #if SIMPLSHARP
using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharp.CrestronIO;
#elif STANDARD #else
using System.IO; using System.IO;
#endif #endif

View File

@@ -4,7 +4,7 @@ using System.Text.RegularExpressions;
using ICD.Common.Properties; using ICD.Common.Properties;
using ICD.Common.Utils.EventArguments; using ICD.Common.Utils.EventArguments;
using ICD.Common.Utils.Extensions; using ICD.Common.Utils.Extensions;
#if SIMPLSHARP #if !NETSTANDARD
using Crestron.SimplSharp; using Crestron.SimplSharp;
#else #else
using System.Diagnostics; using System.Diagnostics;
@@ -99,7 +99,7 @@ namespace ICD.Common.Utils
message = FixLineEndings(message); message = FixLineEndings(message);
#if SIMPLSHARP #if !NETSTANDARD
if (IcdEnvironment.CrestronRuntimeEnvironment == IcdEnvironment.eCrestronRuntimeEnvironment.Appliance) if (IcdEnvironment.CrestronRuntimeEnvironment == IcdEnvironment.eCrestronRuntimeEnvironment.Appliance)
{ {
try try
@@ -125,7 +125,7 @@ namespace ICD.Common.Utils
try try
{ {
#if SIMPLSHARP #if !NETSTANDARD
if (IcdEnvironment.CrestronRuntimeEnvironment != IcdEnvironment.eCrestronRuntimeEnvironment.Server) if (IcdEnvironment.CrestronRuntimeEnvironment != IcdEnvironment.eCrestronRuntimeEnvironment.Server)
CrestronConsole.PrintLine(fixedMessage); CrestronConsole.PrintLine(fixedMessage);
#else #else
@@ -169,7 +169,7 @@ namespace ICD.Common.Utils
try try
{ {
#if SIMPLSHARP #if !NETSTANDARD
if (IcdEnvironment.CrestronRuntimeEnvironment != IcdEnvironment.eCrestronRuntimeEnvironment.Server) if (IcdEnvironment.CrestronRuntimeEnvironment != IcdEnvironment.eCrestronRuntimeEnvironment.Server)
CrestronConsole.Print(fixedMessage); CrestronConsole.Print(fixedMessage);
#else #else
@@ -207,7 +207,7 @@ namespace ICD.Common.Utils
public static bool SendControlSystemCommand(string command, ref string result) public static bool SendControlSystemCommand(string command, ref string result)
{ {
#if SIMPLSHARP #if !NETSTANDARD
// No console on VC4 // No console on VC4
if (IcdEnvironment.CrestronRuntimeEnvironment == IcdEnvironment.eCrestronRuntimeEnvironment.Server) if (IcdEnvironment.CrestronRuntimeEnvironment == IcdEnvironment.eCrestronRuntimeEnvironment.Server)
return false; return false;
@@ -220,7 +220,7 @@ namespace ICD.Common.Utils
public static bool AddNewConsoleCommand(Action<string> callback, string command, string help, eAccessLevel accessLevel) public static bool AddNewConsoleCommand(Action<string> callback, string command, string help, eAccessLevel accessLevel)
{ {
#if SIMPLSHARP #if !NETSTANDARD
// Avoid crashing Simpl applications // Avoid crashing Simpl applications
if (IcdEnvironment.CrestronRuntimeEnvironment != IcdEnvironment.eCrestronRuntimeEnvironment.Appliance) if (IcdEnvironment.CrestronRuntimeEnvironment != IcdEnvironment.eCrestronRuntimeEnvironment.Appliance)
return false; return false;

View File

@@ -1,14 +1,17 @@
#if STANDARD #if !SIMPLSHARP
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Net;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using ICD.Common.Properties; using ICD.Common.Properties;
using ICD.Common.Utils.EventArguments; using ICD.Common.Utils.EventArguments;
using ICD.Common.Utils.Timers; using ICD.Common.Utils.Timers;
using AddressFamily = System.Net.Sockets.AddressFamily;
using Dns = System.Net.Dns;
#if !NETSTANDARD
using Crestron.SimplSharp;
#endif
namespace ICD.Common.Utils namespace ICD.Common.Utils
{ {
@@ -107,8 +110,18 @@ namespace ICD.Common.Utils
static IcdEnvironment() static IcdEnvironment()
{ {
s_Framework = eFramework.Standard; s_Framework = eFramework.Standard;
#if NETFRAMEWORK
s_CrestronSeries = eCrestronSeries.FourSeries;
if (CrestronEnvironment.RuntimeEnvironment == eRuntimeEnvironment.SIMPL)
s_CrestronRuntimeEnvironment = eCrestronRuntimeEnvironment.Simpl;
else if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
s_CrestronRuntimeEnvironment = eCrestronRuntimeEnvironment.Appliance;
else
s_CrestronRuntimeEnvironment = eCrestronRuntimeEnvironment.Server;
#else
s_CrestronSeries = eCrestronSeries.Na; s_CrestronSeries = eCrestronSeries.Na;
s_CrestronRuntimeEnvironment = eCrestronRuntimeEnvironment.Na; s_CrestronRuntimeEnvironment = eCrestronRuntimeEnvironment.Na;
#endif
} }
/// <summary> /// <summary>
@@ -172,6 +185,7 @@ namespace ICD.Common.Utils
handler(sessionId, reasonCode); handler(sessionId, reasonCode);
} }
/// <summary>
/// Call this method to raise the device added/removed event for an added device /// Call this method to raise the device added/removed event for an added device
/// Uses a timer to attempt to compress multiple events into a single event /// Uses a timer to attempt to compress multiple events into a single event
/// </summary> /// </summary>

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using ICD.Common.Properties; using ICD.Common.Properties;
#if SIMPLSHARP #if !NETSTANDARD
using Crestron.SimplSharp; using Crestron.SimplSharp;
#else #else
using System.Diagnostics; using System.Diagnostics;
@@ -32,7 +32,7 @@ namespace ICD.Common.Utils
private static readonly Dictionary<string, Action<string, Exception>> s_LogMethods = private static readonly Dictionary<string, Action<string, Exception>> s_LogMethods =
new Dictionary<string, Action<string, Exception>> new Dictionary<string, Action<string, Exception>>
{ {
#if SIMPLSHARP #if !NETSTANDARD
{ERROR, (m, e) => ErrorLog.Error(m)}, {ERROR, (m, e) => ErrorLog.Error(m)},
{WARN, (m, e) => ErrorLog.Warn(m)}, {WARN, (m, e) => ErrorLog.Warn(m)},
{NOTICE, (m, e) => ErrorLog.Notice(m)}, {NOTICE, (m, e) => ErrorLog.Notice(m)},

View File

@@ -1,7 +1,12 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using System;
using ICD.Common.Properties; using ICD.Common.Properties;
using ICD.Common.Utils.Extensions; using ICD.Common.Utils.Extensions;
using Newtonsoft.Json;
namespace ICD.Common.Utils.Json namespace ICD.Common.Utils.Json
{ {

View File

@@ -1,6 +1,11 @@
using System; #if NETFRAMEWORK
using ICD.Common.Utils.Extensions; extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json; using Newtonsoft.Json;
#endif
using System;
using ICD.Common.Utils.Extensions;
namespace ICD.Common.Utils.Json namespace ICD.Common.Utils.Json
{ {

View File

@@ -1,7 +1,12 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using System;
using ICD.Common.Properties; using ICD.Common.Properties;
using ICD.Common.Utils.Extensions; using ICD.Common.Utils.Extensions;
using Newtonsoft.Json;
namespace ICD.Common.Utils.Json namespace ICD.Common.Utils.Json
{ {

View File

@@ -1,10 +1,15 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using System;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using ICD.Common.Properties; using ICD.Common.Properties;
using ICD.Common.Utils.Extensions; using ICD.Common.Utils.Extensions;
using ICD.Common.Utils.IO; using ICD.Common.Utils.IO;
using Newtonsoft.Json;
namespace ICD.Common.Utils.Json namespace ICD.Common.Utils.Json
{ {

View File

@@ -1,6 +1,11 @@
using System; #if NETFRAMEWORK
using ICD.Common.Utils.Extensions; extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json; using Newtonsoft.Json;
#endif
using System;
using ICD.Common.Utils.Extensions;
namespace ICD.Common.Utils.Json namespace ICD.Common.Utils.Json
{ {

View File

@@ -1,4 +1,10 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
#else
using Newtonsoft.Json;
#endif
using System;
using System.Collections.Generic; using System.Collections.Generic;
#if SIMPLSHARP #if SIMPLSHARP
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
@@ -7,7 +13,6 @@ using System.Reflection;
using System.Runtime.ExceptionServices; using System.Runtime.ExceptionServices;
#endif #endif
using ICD.Common.Properties; using ICD.Common.Properties;
using Newtonsoft.Json;
namespace ICD.Common.Utils.Json namespace ICD.Common.Utils.Json
{ {

View File

@@ -62,7 +62,7 @@ namespace ICD.Common.Utils
{ {
get get
{ {
#if SIMPLSHARP #if !NETSTANDARD
switch (IcdEnvironment.CrestronSeries) switch (IcdEnvironment.CrestronSeries)
{ {
case IcdEnvironment.eCrestronSeries.FourSeries: case IcdEnvironment.eCrestronSeries.FourSeries:

View File

@@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
#if STANDARD #if !SIMPLSHARP
using System.Text; using System.Text;
#endif #endif
using ICD.Common.Properties; using ICD.Common.Properties;
@@ -106,7 +106,7 @@ namespace ICD.Common.Utils.Services.Logging
if (e == null) if (e == null)
throw new ArgumentNullException("e"); throw new ArgumentNullException("e");
#if STANDARD #if !SIMPLSHARP
if (e is AggregateException) if (e is AggregateException)
{ {
extends.AddEntry(severity, e as AggregateException, message); extends.AddEntry(severity, e as AggregateException, message);
@@ -117,7 +117,7 @@ namespace ICD.Common.Utils.Services.Logging
IcdEnvironment.NewLine, e.Message, e.StackTrace)); IcdEnvironment.NewLine, e.Message, e.StackTrace));
} }
#if STANDARD #if !SIMPLSHARP
/// <summary> /// <summary>
/// Logs an aggregate exception as a formatted list of inner exceptions. /// Logs an aggregate exception as a formatted list of inner exceptions.
/// </summary> /// </summary>

View File

@@ -1,6 +1,12 @@
using System; #if NETFRAMEWORK
extern alias RealNewtonsoft;
using RealNewtonsoft.Newtonsoft.Json;
using RealNewtonsoft.Newtonsoft.Json.Converters;
#else
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
#endif
using System;
namespace ICD.Common.Utils.Services.Logging namespace ICD.Common.Utils.Services.Logging
{ {

View File

@@ -3,7 +3,6 @@ using System.Text;
using ICD.Common.Utils.IO; using ICD.Common.Utils.IO;
#if SIMPLSHARP #if SIMPLSHARP
using Crestron.SimplSharp.CrestronXml; using Crestron.SimplSharp.CrestronXml;
#else #else
using System.Xml; using System.Xml;
#endif #endif
@@ -147,7 +146,7 @@ namespace ICD.Common.Utils.Xml
#region Private Methods #region Private Methods
#if STANDARD #if !SIMPLSHARP
private static XmlWriterSettings GetSettings(Encoding encoding) private static XmlWriterSettings GetSettings(Encoding encoding)
{ {
XmlWriterSettings output = GetSettings(); XmlWriterSettings output = GetSettings();