fix: Fix preprocessors for netstandard vs simplsharp

This commit is contained in:
Drew Tingen
2022-06-30 11:01:12 -04:00
parent 16fb3683dd
commit 3b313a442c
8 changed files with 17 additions and 20 deletions

View File

@@ -40,7 +40,7 @@ namespace ICD.Common.Utils
{
if (s_IsConsoleApp == null)
{
#if SIMPLSHARP
#if !NETSTANDARD
s_IsConsoleApp = true;
#else
try
@@ -110,11 +110,10 @@ namespace ICD.Common.Utils
{
PrintLine(message);
}
return;
}
#endif
#else
PrintLine(message);
#endif
}
public static void PrintLine(string message)

View File

@@ -1,4 +1,4 @@
#if SIMPLSHARP
#if !NETSTANDARD
using System;
using System.Collections.Generic;
using Crestron.SimplSharp;

View File

@@ -1,4 +1,4 @@
#if !SIMPLSHARP
#if NETSTANDARD
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,9 +9,7 @@ using ICD.Common.Utils.EventArguments;
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
{

View File

@@ -1,4 +1,4 @@
#if SIMPLSHARP
#if !NETSTANDARD
using System.Globalization;
using Crestron.SimplSharp;
using ICD.Common.Utils.Services;

View File

@@ -1,4 +1,4 @@
#if !SIMPLSHARP
#if NETSTANDARD
using System;
using System.Diagnostics;
using System.Linq;

View File

@@ -2,7 +2,7 @@
using ICD.Common.Utils.IO;
using ICD.Common.Utils.Services;
using ICD.Common.Utils.Services.Logging;
#if SIMPLSHARP
#if !NETSTANDARD
using Crestron.SimplSharp;
using ICD.Common.Properties;
using ICD.Common.Utils.Extensions;

View File

@@ -1,4 +1,4 @@
#if !SIMPLSHARP
#if NETSTANDARD
using ICD.Common.Utils.IO;
using System;
using System.Reflection;

View File

@@ -13,7 +13,7 @@ namespace ICD.Common.Utils
/// </summary>
public sealed class TableBuilder
{
#if SIMPLSHARP
#if !NETSTANDARD
private const char HORIZONTAL = '-';
private const char VERTICAL = '|';
private const char INTERSECT = '+';
@@ -230,7 +230,7 @@ namespace ICD.Common.Utils
private void AppendTopSeparator(StringBuilder builder, IList<int> columnWidths)
{
#if SIMPLSHARP
#if !NETSTANDARD
// Can't do fancy tables so don't bother drawing the top row
#else
builder.Append(DOWN_RIGHT).Append(HORIZONTAL);
@@ -256,7 +256,7 @@ namespace ICD.Common.Utils
private void AppendBottomSeparator(StringBuilder builder, IList<int> columnWidths)
{
#if SIMPLSHARP
#if !NETSTANDARD
AppendSeparator(builder, columnWidths);
#else
builder.Append(UP_RIGHT).Append(HORIZONTAL);
@@ -282,7 +282,7 @@ namespace ICD.Common.Utils
private static void AppendRow(StringBuilder builder, IList<string> row, IList<int> columnWidths)
{
#if !SIMPLSHARP
#if NETSTANDARD
builder.Append(VERTICAL).Append(' ');
#endif
@@ -298,7 +298,7 @@ namespace ICD.Common.Utils
builder.Append(VERTICAL);
}
#if !SIMPLSHARP
#if NETSTANDARD
builder.Append(VERTICAL);
#endif
@@ -307,7 +307,7 @@ namespace ICD.Common.Utils
private static void AppendSeparator(StringBuilder builder, IList<int> columnWidths)
{
#if !SIMPLSHARP
#if NETSTANDARD
builder.Append(VERTICAL_RIGHT).Append(HORIZONTAL);
#endif
@@ -324,7 +324,7 @@ namespace ICD.Common.Utils
builder.Append(INTERSECT);
}
#if !SIMPLSHARP
#if NETSTANDARD
builder.Append(VERTICAL_LEFT);
#endif