From b3313493cc2e6fe5976a2e2a00ea6be4b4c34485 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 3 Jan 2018 16:59:42 -0500 Subject: [PATCH 1/5] Simplifying timer --- ICD.Common.Utils/Timers/SafeTimer.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ICD.Common.Utils/Timers/SafeTimer.cs b/ICD.Common.Utils/Timers/SafeTimer.cs index c79b123..6953a35 100644 --- a/ICD.Common.Utils/Timers/SafeTimer.cs +++ b/ICD.Common.Utils/Timers/SafeTimer.cs @@ -18,7 +18,7 @@ namespace ICD.Common.Utils.Timers private readonly CTimer m_Timer; #else private readonly Timer m_Timer; - private int m_DueTime, m_RepeatPeriod; + private int m_RepeatPeriod; #endif private readonly Action m_Callback; @@ -55,9 +55,8 @@ namespace ICD.Common.Utils.Timers #if SIMPLSHARP m_Timer = new CTimer(SafeCallback, null, dueTime, repeatPeriod); #else - m_DueTime = (int)dueTime; m_RepeatPeriod = (int)repeatPeriod; - m_Timer = new Timer(SafeCallback, null, m_DueTime, m_RepeatPeriod); + m_Timer = new Timer(SafeCallback, null, (int)dueTime, m_RepeatPeriod); #endif } @@ -122,8 +121,7 @@ namespace ICD.Common.Utils.Timers #if SIMPLSHARP m_Timer.Reset(dueTime); #else - m_DueTime = (int)dueTime; - m_Timer.Change(m_DueTime, m_RepeatPeriod); + m_Timer.Change((int)dueTime, m_RepeatPeriod); #endif } @@ -137,9 +135,8 @@ namespace ICD.Common.Utils.Timers #if SIMPLSHARP m_Timer.Reset(dueTime, repeatPeriod); #else - m_DueTime = (int)dueTime; m_RepeatPeriod = (int)repeatPeriod; - m_Timer.Change(m_DueTime, m_RepeatPeriod); + m_Timer.Change((int)dueTime, m_RepeatPeriod); #endif } From 076ed4dd9ef878ba369e0edb62c03bbd43d059a6 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 5 Jan 2018 10:35:14 -0500 Subject: [PATCH 2/5] Updating copyright info --- ICD.Common.Utils/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICD.Common.Utils/Properties/AssemblyInfo.cs b/ICD.Common.Utils/Properties/AssemblyInfo.cs index eb85b04..a5c3849 100644 --- a/ICD.Common.Utils/Properties/AssemblyInfo.cs +++ b/ICD.Common.Utils/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ [assembly: AssemblyTitle("ICD.Common.Utils")] [assembly: AssemblyCompany("ICD Systems")] [assembly: AssemblyProduct("ICD.Common.Utils")] -[assembly: AssemblyCopyright("Copyright © ICD Systems 2017")] +[assembly: AssemblyCopyright("Copyright © ICD Systems 2018")] [assembly: AssemblyVersion("1.0.1.*")] From 86617408aa6d32f4d35e2b1bb7476eaad9e85a18 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Sun, 7 Jan 2018 12:35:16 -0500 Subject: [PATCH 3/5] Updating net standard/core projects to v2.0 --- .../ICD.Common.Utils.Tests_NetStandard.csproj | 2 +- ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj b/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj index 1b01be3..edbec95 100644 --- a/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj +++ b/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj @@ -2,7 +2,7 @@ Library - netcoreapp1.1 + netcoreapp2.0 ICD.Common.Utils.Tests diff --git a/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj b/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj index fe2e2a3..c8cafd7 100644 --- a/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj +++ b/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj @@ -2,7 +2,7 @@ Library - netstandard1.6 + netstandard2.0 ICD.Common.Utils $(AssemblyName) True From 5b8675025ea464b96b1dca16e27a1dd9ce9a001c Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Sun, 7 Jan 2018 12:36:43 -0500 Subject: [PATCH 4/5] Fixing ambiguous reference --- ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs b/ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs index 6cf3a7d..9b72795 100644 --- a/ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs +++ b/ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs @@ -309,7 +309,7 @@ namespace ICD.Common.Utils.Tests.Extensions [Test] public void ToHashSetTest() { - IcdHashSet values = (new[] {1, 2, 3}).ToHashSet(); + IcdHashSet values = EnumerableExtensions.ToHashSet(new[] {1, 2, 3}); Assert.AreEqual(3, values.Count); Assert.IsTrue(values.Contains(1)); From 38973bb6bc2cb465616bbb34387eb0d2f15a4c83 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Sun, 7 Jan 2018 12:43:41 -0500 Subject: [PATCH 5/5] Updating nuget packages --- .../ICD.Common.Utils.Tests_NetStandard.csproj | 6 +++--- ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj b/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj index edbec95..159e19e 100644 --- a/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj +++ b/ICD.Common.Utils.Tests/ICD.Common.Utils.Tests_NetStandard.csproj @@ -16,9 +16,9 @@ - - - + + + diff --git a/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj b/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj index c8cafd7..3392975 100644 --- a/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj +++ b/ICD.Common.Utils/ICD.Common.Utils_NetStandard.csproj @@ -44,7 +44,7 @@ - +