Merge remote-tracking branch 'origin/dev' into RoutingOp

This commit is contained in:
Chris Cameron
2018-01-08 14:32:28 -05:00
5 changed files with 12 additions and 15 deletions

View File

@@ -309,7 +309,7 @@ namespace ICD.Common.Utils.Tests.Extensions
[Test]
public void ToHashSetTest()
{
IcdHashSet<int> values = (new[] {1, 2, 3}).ToHashSet();
IcdHashSet<int> values = EnumerableExtensions.ToHashSet(new[] {1, 2, 3});
Assert.AreEqual(3, values.Count);
Assert.IsTrue(values.Contains(1));

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RootNamespace>ICD.Common.Utils.Tests</RootNamespace>
</PropertyGroup>
@@ -16,9 +16,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netstandard1.6</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>ICD.Common.Utils</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
@@ -44,7 +44,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.0.4" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />

View File

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

View File

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