mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
fix: Fix preprocessors for netstandard vs simplsharp
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if !SIMPLSHARP
|
#if NETSTANDARD
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user