src\Dependencies\Collections\Segmented\SegmentedArray.cs (31)
22=> Clear(array, 0, array.Length);
41if (length > sourceArray.Length)
43if (length > destinationArray.Length)
61if (length > sourceArray.Length)
87if ((uint)(sourceIndex + length) > sourceArray.Length)
89if ((uint)(destinationIndex + length) > destinationArray.Length)
117Debug.Assert((uint)(sourceIndex + length) <= array.Length);
118Debug.Assert((uint)(destinationIndex + length) <= array.Length);
156if ((uint)(sourceIndex + length) > sourceArray.Length)
176return BinarySearch(array, 0, array.Length, value, comparer: null);
181return BinarySearch(array, 0, array.Length, value, comparer);
195if (array.Length - index < length)
203return IndexOf(array, value, 0, array.Length, comparer: null);
208return IndexOf(array, value, startIndex, array.Length - startIndex, comparer: null);
218if ((uint)startIndex > (uint)array.Length)
223if ((uint)count > (uint)(array.Length - startIndex))
268return LastIndexOf(array, value, array.Length - 1, array.Length, comparer: null);
273return LastIndexOf(array, value, startIndex, array.Length == 0 ? 0 : startIndex + 1, comparer: null);
283if (array.Length == 0)
302if ((uint)startIndex >= (uint)array.Length)
337Reverse(array, 0, array.Length);
346if (array.Length - index < length)
366if (array.Length > 1)
368var segment = new SegmentedArraySegment<T>(array, 0, array.Length);
380Sort(array, 0, array.Length, comparer);
389if (array.Length - index < length)
406if (array.Length > 1)
408var segment = new SegmentedArraySegment<T>(array, 0, array.Length);
666_length = array.Length;
671if (offset < 0 || length < 0 || (uint)(offset + length) > (uint)array.Length)
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (26)
131if (_count > 0 && _entries.Length / _count > ShrinkThreshold)
162var capacity = source._buckets.Length;
204Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
205Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
224if (buckets.Length > 0)
227Debug.Assert(entries.Length > 0, "Expected _entries to be initialized");
249if (collisionCount > (uint)entries.Length)
271if (collisionCount > (uint)entries.Length)
288return ref buckets[(int)HashHelpers.FastMod((uint)hashCode, (uint)buckets.Length, _fastModMultiplier)];
293if (_buckets.Length > 0)
296Debug.Assert(entries.Length > 0, "entries should be non-empty");
345if (collisionCount > (uint)entries.Length)
400if (_buckets.Length > 0)
881var currentCapacity = _entries.Length;
887if (_buckets.Length == 0)
901Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
902Debug.Assert(newSize >= _entries.Length);
958var currentCapacity = oldEntries.Length;
1019if (_buckets.Length == 0)
1023Debug.Assert(_buckets.Length > 0);
1026Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
1054if (collisionCount > (uint)entries.Length)
1078if (collisionCount > (uint)entries.Length)
1097if (count == entries.Length)
1172Debug.Assert(_buckets.Length > 0, "_buckets shouldn't be empty; callers should check first");
1329Debug.Assert((_buckets.Length > 0) && (_count > 0), "_buckets was empty but count greater than 0");