mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11a5533fcd | ||
|
|
e0d0763306 | ||
|
|
7d42158bc7 | ||
|
|
92a28813e0 | ||
|
|
3b313a442c | ||
|
|
16fb3683dd | ||
|
|
bb9bcf6cdf |
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [16.0.4] 2022-07-01
|
||||
### Changed
|
||||
- Fixed PreProcessors for NETSTANDARD vs SIMPLSHARP for 4-series builds
|
||||
- Updated Crestron SDK to 2.18.96
|
||||
|
||||
## [16.0.3] 2022-06-23
|
||||
### Changed
|
||||
- Throwing better exception when trying to get unknown timezones
|
||||
|
||||
## [16.0.2] 2022-05-23
|
||||
### Changed
|
||||
- Fixed an issue in IcdUriBuilder where relative pathes were not being built into a valid URI.
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
<None Remove="Properties\ControlSystem.cfg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Condition="'$(TargetFramework)' == 'net472'" Include="Crestron.SimplSharp.SDK.Library" Version="2.17.69" />
|
||||
<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 Condition="'$(TargetFramework)' == 'net472'" Include="Crestron.SimplSharp.SDK.Library" Version="2.18.96" />
|
||||
<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 Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="Microsoft.Data.SQLite" Version="5.0.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||
<PackageReference Include="Pastel" Version="2.1.0" />
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using System.Globalization;
|
||||
using Crestron.SimplSharp;
|
||||
using ICD.Common.Utils.Services;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if !SIMPLSHARP
|
||||
#if NETSTANDARD
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if !SIMPLSHARP
|
||||
#if NETSTANDARD
|
||||
using ICD.Common.Utils.IO;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -4,4 +4,4 @@ using System.Reflection;
|
||||
[assembly: AssemblyCompany("ICD Systems")]
|
||||
[assembly: AssemblyProduct("ICD.Common.Utils")]
|
||||
[assembly: AssemblyCopyright("Copyright © ICD Systems 2022")]
|
||||
[assembly: AssemblyVersion("16.0.2.0")]
|
||||
[assembly: AssemblyVersion("16.0.4.0")]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using SqliteCommand = Crestron.SimplSharp.SQLite.SQLiteCommand;
|
||||
#else
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using ICD.Common.Utils.IO;
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using SqliteConnection = Crestron.SimplSharp.SQLite.SQLiteConnection;
|
||||
#else
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using SqliteDataReader = Crestron.SimplSharp.SQLite.SQLiteDataReader;
|
||||
#else
|
||||
using System;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using SqliteParameter = Crestron.SimplSharp.SQLite.SQLiteParameter;
|
||||
#else
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using SqliteParameterCollection = Crestron.SimplSharp.SQLite.SQLiteParameterCollection;
|
||||
#else
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
using Crestron.SimplSharp.CrestronData;
|
||||
#else
|
||||
using System;
|
||||
@@ -41,14 +41,14 @@ namespace ICD.Common.Utils.Sqlite
|
||||
public static class DbTypeExtensions
|
||||
{
|
||||
public static
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
DbType
|
||||
#else
|
||||
SqliteType
|
||||
#endif
|
||||
ToParamType(this eDbType extends)
|
||||
{
|
||||
#if SIMPLSHARP
|
||||
#if !NETSTANDARD
|
||||
return (DbType)extends;
|
||||
#else
|
||||
switch (extends)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -61,7 +61,11 @@ namespace ICD.Common.Utils.TimeZoneInfo
|
||||
|
||||
public static IcdTimeZoneInfo FindSystemTimeZoneById(string timeZoneId)
|
||||
{
|
||||
return s_Cache[timeZoneId];
|
||||
IcdTimeZoneInfo timeZone;
|
||||
if (s_Cache.TryGetValue(timeZoneId, out timeZone))
|
||||
return timeZone;
|
||||
|
||||
throw new KeyNotFoundException(string.Format("Unable to find timezone with id:{0}", timeZoneId));
|
||||
}
|
||||
|
||||
public static bool TryFindSystemTimeZoneById(string timeZoneId, out IcdTimeZoneInfo output)
|
||||
|
||||
Reference in New Issue
Block a user