mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-12 11:15:12 +00:00
Renaming ToHashSet method to avoid collision
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user