9 internal static class HashCodeExtensions
18 public static void AddRange<T>(
this ref HashCode
self, IEnumerable<T>? items)
27 foreach (var i
in items)
38 public static void AddRange<T>(
this ref HashCode
self, T[]? items)
47 foreach (var i
in items)
58 public static void AddRange<T>(
this ref HashCode
self, ImmutableArray<T> items)
67 foreach (var i
in items)
79 public static void AddRange<T>(
this ref HashCode
self, ImmutableHashSet<T> items, IComparer<T> comparer)
82 throw new ArgumentNullException(nameof(comparer));
90 var l = items.ToArray();
91 Array.Sort(l, comparer);
94 foreach (var i
in items)
105 public static void AddRange<T>(
this ref HashCode
self, ImmutableHashSet<T> items)
107 AddRange(
ref self, items, Comparer<T>.Default);
117 public static void AddRange<T>(
this ref HashCode
self, ISet<T> items, IComparer<T> comparer)
119 if (comparer is
null)
120 throw new ArgumentNullException(nameof(comparer));
128 var l = items.ToArray();
129 Array.Sort(l, comparer);
132 foreach (var i
in items)
143 public static void AddRange<T>(
this ref HashCode
self, ISet<T> items)
145 AddRange(
ref self, items, Comparer<T>.Default);