Renaming ToHashSet method to avoid collision

This commit is contained in:
Chris Cameron
2018-01-09 11:05:45 -05:00
parent 46c9cb0cf0
commit e377f7993b
4 changed files with 5 additions and 5 deletions

View File

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

View File

@@ -118,7 +118,7 @@ namespace ICD.Common.Utils.Attributes.Rpc
BindingFlags.Instance)
.Where(m => ReflectionExtensions.GetCustomAttributes<RpcAttribute>(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<RpcAttribute>(p, true)
.Any(a => a.m_Key == key))
.ToHashSet();
.ToIcdHashSet();
}
return s_PropertyCache[clientType][key];

View File

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

View File

@@ -496,7 +496,7 @@ namespace ICD.Common.Utils.Extensions
/// <typeparam name="T"></typeparam>
/// <param name="extends"></param>
/// <returns></returns>
public static IcdHashSet<T> ToHashSet<T>(this IEnumerable<T> extends)
public static IcdHashSet<T> ToIcdHashSet<T>(this IEnumerable<T> extends)
{
if (extends == null)
throw new ArgumentNullException("extends");