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

View File

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

View File

@@ -1,4 +1,4 @@
#if !SIMPLSHARP #if NETSTANDARD
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@@ -9,9 +9,7 @@ using ICD.Common.Utils.EventArguments;
using ICD.Common.Utils.Timers; using ICD.Common.Utils.Timers;
using AddressFamily = System.Net.Sockets.AddressFamily; using AddressFamily = System.Net.Sockets.AddressFamily;
using Dns = System.Net.Dns; using Dns = System.Net.Dns;
#if !NETSTANDARD
using Crestron.SimplSharp;
#endif
namespace ICD.Common.Utils namespace ICD.Common.Utils
{ {

View File

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

View File

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

View File

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

View File

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

View File

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