From e377f7993bb51ce6f1113b9d2d0dab907b1279eb Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 9 Jan 2018 11:05:45 -0500 Subject: [PATCH] Renaming ToHashSet method to avoid collision --- ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs | 2 +- ICD.Common.Utils/Attributes/Rpc/RpcAttribute.cs | 4 ++-- ICD.Common.Utils/EnumUtils.cs | 2 +- ICD.Common.Utils/Extensions/EnumerableExtensions.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs b/ICD.Common.Utils.Tests/Extensions/EnumerableExtensionsTest.cs index d4df2f8..88ffe0d 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 = EnumerableExtensions.ToHashSet(new[] {1, 2, 3}); + IcdHashSet values = new[] {1, 2, 3}.ToIcdHashSet(); Assert.AreEqual(3, values.Count); Assert.IsTrue(values.Contains(1)); diff --git a/ICD.Common.Utils/Attributes/Rpc/RpcAttribute.cs b/ICD.Common.Utils/Attributes/Rpc/RpcAttribute.cs index aac1c1a..e66cb69 100644 --- a/ICD.Common.Utils/Attributes/Rpc/RpcAttribute.cs +++ b/ICD.Common.Utils/Attributes/Rpc/RpcAttribute.cs @@ -118,7 +118,7 @@ namespace ICD.Common.Utils.Attributes.Rpc BindingFlags.Instance) .Where(m => ReflectionExtensions.GetCustomAttributes(m, true) .Any(a => a.m_Key == key)) - .ToHashSet(); + .ToIcdHashSet(); } return s_MethodCache[clientType][key]; @@ -161,7 +161,7 @@ namespace ICD.Common.Utils.Attributes.Rpc BindingFlags.Instance) .Where(p => p.CanWrite && ReflectionExtensions.GetCustomAttributes(p, true) .Any(a => a.m_Key == key)) - .ToHashSet(); + .ToIcdHashSet(); } return s_PropertyCache[clientType][key]; diff --git a/ICD.Common.Utils/EnumUtils.cs b/ICD.Common.Utils/EnumUtils.cs index e928728..17354f1 100644 --- a/ICD.Common.Utils/EnumUtils.cs +++ b/ICD.Common.Utils/EnumUtils.cs @@ -119,7 +119,7 @@ namespace ICD.Common.Utils // Reflection is slow and this method is called a lot, so we cache the results. if (!s_EnumValuesCache.ContainsKey(type)) - s_EnumValuesCache[type] = GetValuesUncached(type).ToHashSet(); + s_EnumValuesCache[type] = GetValuesUncached(type).ToIcdHashSet(); return s_EnumValuesCache[type]; } diff --git a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs index 24498ed..c8a97de 100644 --- a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs +++ b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs @@ -496,7 +496,7 @@ namespace ICD.Common.Utils.Extensions /// /// /// - public static IcdHashSet ToHashSet(this IEnumerable extends) + public static IcdHashSet ToIcdHashSet(this IEnumerable extends) { if (extends == null) throw new ArgumentNullException("extends");