diff --git a/ICD.Common.Utils.Tests/SafeCriticalSectionTest.cs b/ICD.Common.Utils.Tests/SafeCriticalSectionTest.cs index 4feda40..193d406 100644 --- a/ICD.Common.Utils.Tests/SafeCriticalSectionTest.cs +++ b/ICD.Common.Utils.Tests/SafeCriticalSectionTest.cs @@ -47,14 +47,14 @@ namespace ICD.Common.Utils.Tests section.Enter(); // ReSharper disable once NotAccessedVariable - object handle = ThreadingUtils.SafeInvoke(() => { result = section.TryEnter() ? 0 : 1; }); + ThreadingUtils.SafeInvoke(() => { result = section.TryEnter() ? 0 : 1; }); Assert.IsTrue(ThreadingUtils.Wait(() => result == 1, 1000)); section.Leave(); // ReSharper disable once RedundantAssignment - handle = ThreadingUtils.SafeInvoke(() => + ThreadingUtils.SafeInvoke(() => { result = section.TryEnter() ? 2 : 0; section.Leave(); diff --git a/ICD.Common.Utils/ThreadingUtils.cs b/ICD.Common.Utils/ThreadingUtils.cs index 44ab329..072d6dd 100644 --- a/ICD.Common.Utils/ThreadingUtils.cs +++ b/ICD.Common.Utils/ThreadingUtils.cs @@ -11,7 +11,7 @@ using Crestron.SimplSharp; using Crestron.SimplSharp.Reflection; #else using System.Threading.Tasks; -using System.Reflection; +using MethodInfo = System.Reflection.MethodInfo; #endif namespace ICD.Common.Utils