SegmentedArray.cs (30)
33if (length > sourceArray.Length)
35if (length > destinationArray.Length)
53if (length > sourceArray.Length)
79if ((uint)(sourceIndex + length) > sourceArray.Length)
81if ((uint)(destinationIndex + length) > destinationArray.Length)
109Debug.Assert((uint)(sourceIndex + length) <= array.Length);
110Debug.Assert((uint)(destinationIndex + length) <= array.Length);
148if ((uint)(sourceIndex + length) > sourceArray.Length)
168return BinarySearch(array, 0, array.Length, value, comparer: null);
173return BinarySearch(array, 0, array.Length, value, comparer);
187if (array.Length - index < length)
195return IndexOf(array, value, 0, array.Length, comparer: null);
200return IndexOf(array, value, startIndex, array.Length - startIndex, comparer: null);
210if ((uint)startIndex > (uint)array.Length)
215if ((uint)count > (uint)(array.Length - startIndex))
260return LastIndexOf(array, value, array.Length - 1, array.Length, comparer: null);
265return LastIndexOf(array, value, startIndex, array.Length == 0 ? 0 : startIndex + 1, comparer: null);
275if (array.Length == 0)
294if ((uint)startIndex >= (uint)array.Length)
329Reverse(array, 0, array.Length);
338if (array.Length - index < length)
358if (array.Length > 1)
360var segment = new SegmentedArraySegment<T>(array, 0, array.Length);
372Sort(array, 0, array.Length, comparer);
381if (array.Length - index < length)
398if (array.Length > 1)
400var segment = new SegmentedArraySegment<T>(array, 0, array.Length);
658_length = array.Length;
663if (offset < 0 || length < 0 || (uint)(offset + length) > (uint)array.Length)
SegmentedDictionary`2.cs (33)
236Debug.Assert(_buckets.Length > 0, "_buckets should be non-empty");
237Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
239SegmentedArray.Clear(_buckets, 0, _buckets.Length);
335if (_buckets.Length > 0)
337Debug.Assert(_entries.Length > 0, "expected entries to be non-empty");
354if ((uint)i >= (uint)entries.Length)
368} while (collisionCount <= (uint)entries.Length);
386if ((uint)i >= (uint)entries.Length)
400} while (collisionCount <= (uint)entries.Length);
418if ((uint)i >= (uint)entries.Length)
432} while (collisionCount <= (uint)entries.Length);
475if (_buckets.Length == 0)
479Debug.Assert(_buckets.Length > 0);
482Debug.Assert(entries.Length > 0, "expected entries to be non-empty");
500if ((uint)i >= (uint)entries.Length)
524if (collisionCount > (uint)entries.Length)
542if ((uint)i >= (uint)entries.Length)
566if (collisionCount > (uint)entries.Length)
581if ((uint)i >= (uint)entries.Length)
605if (collisionCount > (uint)entries.Length)
625if (count == entries.Length)
650Debug.Assert(_entries.Length > 0, "_entries should be non-empty");
651Debug.Assert(newSize >= _entries.Length);
685if (_buckets.Length > 0)
687Debug.Assert(_entries.Length > 0, "entries should be non-empty");
735if (collisionCount > (uint)entries.Length)
757if (_buckets.Length > 0)
759Debug.Assert(_entries.Length > 0, "entries should be non-empty");
809if (collisionCount > (uint)entries.Length)
927var currentCapacity = _entries.Length;
935if (_buckets.Length == 0)
976var currentCapacity = oldEntries.Length;
1120return ref buckets[(int)HashHelpers.FastMod(hashCode, (uint)buckets.Length, _fastModMultiplier)];