From d0740c915b4bbba987118555b5550e4abb00038f Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 12 Sep 2018 09:49:30 -0400 Subject: [PATCH 1/3] refactor: Tidying --- ICD.Common.Utils/Extensions/MethodInfoExtensions.cs | 5 ++++- ICD.Common.Utils/IcdConsole.cs | 3 ++- ICD.Common.Utils/RecursionUtils.cs | 1 - .../Services/Scheduler/AbstractScheduledAction.cs | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ICD.Common.Utils/Extensions/MethodInfoExtensions.cs b/ICD.Common.Utils/Extensions/MethodInfoExtensions.cs index 611b38a..0b19219 100644 --- a/ICD.Common.Utils/Extensions/MethodInfoExtensions.cs +++ b/ICD.Common.Utils/Extensions/MethodInfoExtensions.cs @@ -91,10 +91,13 @@ namespace ICD.Common.Utils.Extensions } sigBuilder.Append("this "); } -#endif } else if (secondParam) + { secondParam = false; +#endif + } + else sigBuilder.Append(", "); diff --git a/ICD.Common.Utils/IcdConsole.cs b/ICD.Common.Utils/IcdConsole.cs index a6c1a8c..d27d370 100644 --- a/ICD.Common.Utils/IcdConsole.cs +++ b/ICD.Common.Utils/IcdConsole.cs @@ -1,9 +1,10 @@ using System; -using System.Diagnostics; using System.Linq; using ICD.Common.Properties; #if SIMPLSHARP using Crestron.SimplSharp; +#else +using System.Diagnostics; #endif namespace ICD.Common.Utils diff --git a/ICD.Common.Utils/RecursionUtils.cs b/ICD.Common.Utils/RecursionUtils.cs index e30d4bf..425c2ee 100644 --- a/ICD.Common.Utils/RecursionUtils.cs +++ b/ICD.Common.Utils/RecursionUtils.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using ICD.Common.Properties; using ICD.Common.Utils.Collections; -using ICD.Common.Utils.Extensions; namespace ICD.Common.Utils { diff --git a/ICD.Common.Utils/Services/Scheduler/AbstractScheduledAction.cs b/ICD.Common.Utils/Services/Scheduler/AbstractScheduledAction.cs index 3cfbd2f..891d06c 100644 --- a/ICD.Common.Utils/Services/Scheduler/AbstractScheduledAction.cs +++ b/ICD.Common.Utils/Services/Scheduler/AbstractScheduledAction.cs @@ -1,5 +1,4 @@ using System; -using ICD.Common.Utils.EventArguments; using ICD.Common.Utils.Extensions; namespace ICD.Common.Utils.Services.Scheduler From c83bd04c8f18e0d39ccfb1eb63ae64ee6adbed5c Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 14 Sep 2018 14:06:09 -0400 Subject: [PATCH 2/3] chore: Incrementing major version, updating changelog --- CHANGELOG.md | 9 +++++++++ ICD.Common.Utils/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 955766d..e235e6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [5.0.0] - 2018-09-14 +### Added + - Stopwatch profiling methods + - Attempt to interpret old assembly naming convention when parsing types + - Added RegexUtils + +### Changed + - Significant performance improvements across the board + ## [4.0.0] - 2018-07-19 ### Added - Added extension method for getting type name without trailing generic info diff --git a/ICD.Common.Utils/Properties/AssemblyInfo.cs b/ICD.Common.Utils/Properties/AssemblyInfo.cs index 1db615b..ad9aad0 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 2018")] -[assembly: AssemblyVersion("4.0.0.0")] +[assembly: AssemblyVersion("5.0.0.0")] From df30585917af4cf408dcb6dbebf2c00df5d29242 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Mon, 17 Sep 2018 15:52:44 -0400 Subject: [PATCH 3/3] perf: Don't use reflection in AbstractGenericJsonConverter --- ICD.Common.Utils/Json/AbstractGenericJsonConverter.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ICD.Common.Utils/Json/AbstractGenericJsonConverter.cs b/ICD.Common.Utils/Json/AbstractGenericJsonConverter.cs index a6ea772..0b95a0c 100644 --- a/ICD.Common.Utils/Json/AbstractGenericJsonConverter.cs +++ b/ICD.Common.Utils/Json/AbstractGenericJsonConverter.cs @@ -10,10 +10,7 @@ namespace ICD.Common.Utils.Json /// Creates a new instance of T. /// /// - protected virtual T Instantiate() - { - return ReflectionUtils.CreateInstance(); - } + protected abstract T Instantiate(); /// /// Writes the JSON representation of the object.