Compare commits

...

7 Commits

Author SHA1 Message Date
Drew Tingen
11a5533fcd chore: Update changelog, increment assembly patch version 2022-07-01 12:02:45 -04:00
Drew Tingen
e0d0763306 chore: Update Crestron SDK to 2.18.96 2022-07-01 11:58:28 -04:00
Drew Tingen
7d42158bc7 chore: sqlite reference only for netstandard 2022-06-30 18:49:21 -04:00
Drew Tingen
92a28813e0 fix: Use Crestron SQLite for 4 series 2022-06-30 17:58:01 -04:00
Drew Tingen
3b313a442c fix: Fix preprocessors for netstandard vs simplsharp 2022-06-30 11:01:12 -04:00
Drew Tingen
16fb3683dd chore: Update changelog, increment assembly patch version 2022-06-23 15:07:50 -04:00
Drew Tingen
bb9bcf6cdf feat: TimeZone getting an invalid time zone now throws exception with time zone name 2022-06-23 15:05:45 -04:00
18 changed files with 44 additions and 34 deletions

View File

@@ -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.

View File

@@ -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" />

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

@@ -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")]

View File

@@ -1,5 +1,5 @@
using System;
#if SIMPLSHARP
#if !NETSTANDARD
using SqliteCommand = Crestron.SimplSharp.SQLite.SQLiteCommand;
#else
using Microsoft.Data.Sqlite;

View File

@@ -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;

View File

@@ -1,4 +1,4 @@
#if SIMPLSHARP
#if !NETSTANDARD
using SqliteDataReader = Crestron.SimplSharp.SQLite.SQLiteDataReader;
#else
using System;

View File

@@ -1,4 +1,4 @@
#if SIMPLSHARP
#if !NETSTANDARD
using SqliteParameter = Crestron.SimplSharp.SQLite.SQLiteParameter;
#else
using Microsoft.Data.Sqlite;

View File

@@ -1,4 +1,4 @@
#if SIMPLSHARP
#if !NETSTANDARD
using SqliteParameterCollection = Crestron.SimplSharp.SQLite.SQLiteParameterCollection;
#else
using Microsoft.Data.Sqlite;

View File

@@ -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)

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

View File

@@ -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)