From 57e64788c487269e96f907c69121890be056f6ce Mon Sep 17 00:00:00 2001 From: Austin Noska Date: Wed, 27 Oct 2021 18:06:29 -0400 Subject: [PATCH 1/2] fix: Change sqlite connection strings for IcdCultureInfo & IcdTimeZoneInfo to work with SimplSharp --- CHANGELOG.md | 2 ++ ICD.Common.Utils/Globalization/IcdCultureInfo.cs | 8 +++----- ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66cb95c..2465677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + - Changed sqlite connection strings in IcdCultureInfo & IcdTimeZoneInfo to work with SimplSharp. ## [16.0.0] 2021-10-04 ### Added diff --git a/ICD.Common.Utils/Globalization/IcdCultureInfo.cs b/ICD.Common.Utils/Globalization/IcdCultureInfo.cs index 5f33a2a..035981b 100644 --- a/ICD.Common.Utils/Globalization/IcdCultureInfo.cs +++ b/ICD.Common.Utils/Globalization/IcdCultureInfo.cs @@ -96,11 +96,8 @@ namespace ICD.Common.Utils.Globalization { private const string SQL_LOCAL_DATABASE_FILE = "CultureInfo.sqlite"; private const string SQL_CONNECTION_STRING_FORMAT = -#if SIMPLSHARP - "Data Source={0};Version=3;ReadOnly=True"; -#else "Data Source={0}"; -#endif + private const string SQL_CMD_SELECT_BY_NAME = "select * from cultureinfo where name = @name collate nocase"; private const string SQL_CMD_SELECT_BY_LCID = "select * from cultureinfo where lcid = @lcid"; private const string SQL_CMD_SELECT_BY_ID = "select * from cultureinfo where id = @id"; @@ -466,8 +463,9 @@ namespace ICD.Common.Utils.Globalization } } } - catch (Exception) + catch (Exception e) { + IcdErrorLog.Exception(e, "Error populating IcdCultureInfo cache - {0}", e.Message); s_IsDatabasePresent = false; return; } diff --git a/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs b/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs index cbeb900..5d15110 100644 --- a/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs +++ b/ICD.Common.Utils/TimeZoneInfo/IcdTimeZoneInfo.cs @@ -18,11 +18,7 @@ namespace ICD.Common.Utils.TimeZoneInfo private const string SQL_LOCAL_DATABASE_FILE = "TimeZones.sqlite"; private const string SQL_CONNECTION_STRING_FORMAT = -#if SIMPLSHARP - "Data Source={0};Version=3;ReadOnly=True"; -#else "Data Source={0}"; -#endif private static readonly Dictionary s_Cache; From 16067bca20e793c2df5cd9c3ac14ad1b16e9f706 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 28 Oct 2021 11:13:30 -0400 Subject: [PATCH 2/2] chore: Updating changelog, incrementing patch version --- CHANGELOG.md | 2 ++ ICD.Common.Utils/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2465677..c3e9330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [16.0.1] 2021-10-28 ### Changed - Changed sqlite connection strings in IcdCultureInfo & IcdTimeZoneInfo to work with SimplSharp. diff --git a/ICD.Common.Utils/Properties/AssemblyInfo.cs b/ICD.Common.Utils/Properties/AssemblyInfo.cs index 79181bb..bb5f686 100644 --- a/ICD.Common.Utils/Properties/AssemblyInfo.cs +++ b/ICD.Common.Utils/Properties/AssemblyInfo.cs @@ -4,4 +4,4 @@ using System.Reflection; [assembly: AssemblyCompany("ICD Systems")] [assembly: AssemblyProduct("ICD.Common.Utils")] [assembly: AssemblyCopyright("Copyright © ICD Systems 2021")] -[assembly: AssemblyVersion("16.0.0.0")] +[assembly: AssemblyVersion("16.0.1.0")]