1 write to array
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (1)
63this.array = items;
108 references to array
System.Collections.Immutable (108)
System\Collections\Immutable\ImmutableArray.cs (1)
260Array.Copy(items.array!, start, array, 0, length);
System\Collections\Immutable\ImmutableArray_1.Builder.cs (9)
77_elements = ImmutableArray<T>.Empty.array!; 211_elements = ImmutableArray<T>.Empty.array!; 234_elements = ImmutableArray<T>.Empty.array!; 317Array.Copy(items.array!, 0, _elements, index, items.Length); 423if (items.array != null) 425this.AddRange(items.array, length); 465if (items.array != null) 467this.AddRange(items.array); 687return Empty.array!;
System\Collections\Immutable\ImmutableArray_1.cs (42)
99public ReadOnlySpan<T> AsSpan() => new ReadOnlySpan<T>(array); 105public ReadOnlyMemory<T> AsMemory() => new ReadOnlyMemory<T>(array); 182return Array.IndexOf(self.array!, item, startIndex, count); 188if (equalityComparer.Equals(self.array![i], item)) 267return Array.LastIndexOf(self.array!, item, startIndex, count); 273if (equalityComparer.Equals(item, self.array![i])) 329Array.Copy(self.array!, tmp, index); 333Array.Copy(self.array!, index, tmp, index + 1, self.Length - index); 367Array.Copy(self.array!, tmp, index); 371Array.Copy(self.array!, index, tmp, index + count, self.Length - index); 467Array.Copy(self.array!, tmp, self.Length); 491Array.Copy(self.array!, tmp, self.Length); 508if (items.array != null) 510return self.AddRange(items.array, length); 527if (items.array != null) 529return self.AddRange(items.array); 561Array.Copy(self.array!, tmp, self.Length); 661Array.Copy(self.array!, tmp, index); 662Array.Copy(self.array!, index + length, tmp, index, self.Length - index - length); 732Requires.NotNull(items.array!, nameof(items)); 760for (int i = 0; i < self.array!.Length; i++) 762if (match(self.array[i])) 841if (comparer.Compare(self.array![i - 1], self.array[i]) > 0) 851Array.Copy(self.array!, tmp, self.Length); 870if (self.array == null || self.array.Length == 0) 875return self.array.OfType<TResult>(); 906public ReadOnlySpan<T> AsSpan(int start, int length) => new ReadOnlySpan<T>(array, start, length); 1375Array.Copy(self.array!, 0, array, index, self.Length); 1394if (self.array == null && otherArray == null) 1398else if (self.array == null) 1405IStructuralEquatable ours = self.array!; 1417IStructuralEquatable? ours = self.array; 1444if (self.array == null && otherArray == null) 1448else if (self.array == null ^ otherArray == null) 1457IStructuralComparable? ours = self.array; 1497Array.Copy(self.array!, copied + removed, newArray, copied, copyLength); 1503Array.Copy(self.array!, copied + removed, newArray, copied, self.Length - (copied + removed)); 1510Debug.Assert(array != null); 1517Array.Copy(array!, tmp, index); 1522Array.Copy(array!, index, tmp, index + items.Length, Length - index);
System\Collections\Immutable\ImmutableArray_1.Enumerator.cs (1)
77new EnumeratorObject(ImmutableArray<T>.Empty.array!);
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (24)
131return this.array![index]; 147return ref this.array![index]; 157get { return this.array!.Length == 0; } 174return this.array!.Length; 184get { return this.array == null; } 196return self.array == null || self.array.Length == 0; 206get { return this.array; } 230Array.Copy(self.array!, destination, self.Length); 242Array.Copy(self.array!, 0, destination, destinationIndex, self.Length); 256Array.Copy(self.array!, sourceIndex, destination, destinationIndex, length); 285return new Enumerator(self.array!); 297return self.array == null ? 0 : self.array.GetHashCode(); 309return obj is IImmutableArray other && this.array == other.Array; 322return this.array == other.array; 341return new ImmutableArray<T>(items.array); 355return new ImmutableArray<TOther>((TOther[])(object)array!); 379return new ImmutableArray<TOther>((this.array as TOther[])); 391return EnumeratorObject.Create(self.array!); 403return EnumeratorObject.Create(self.array!); 419_ = this.array!.Length; 423/// Throws an <see cref="InvalidOperationException"/> if the <see cref="array"/> field is null, i.e. the
System\Collections\Immutable\ImmutableArray_1.netcoreapp.cs (1)
21return new ReadOnlySpan<T>(self.array, start, length);
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (2)
126Array.Copy(immutable.array!, 0, array, arrayIndex, immutable.Length); 153return ImmutableArray<T>.Empty.array!;
System\Linq\ImmutableArrayExtensions.cs (27)
31return immutableArray.array!.Select(selector); 89return immutableArray.array!.Where(predicate); 114foreach (T v in immutableArray.array!) 140foreach (T v in immutableArray.array!) 160if (object.ReferenceEquals(immutableArray.array, items.array)) 174if (!comparer.Equals(immutableArray.array![i], items.array![i])) 225if (object.ReferenceEquals(immutableArray.array, items.array)) 278foreach (T v in immutableArray.array!) 334foreach (T v in immutableArray.array!) 358: Enumerable.First(immutableArray.array!); 368return immutableArray.array!.Length > 0 ? immutableArray.array[0] : default; 379foreach (T v in immutableArray.array!) 401: Enumerable.Last(immutableArray.array!); 432return immutableArray.array!.LastOrDefault()!; 462return immutableArray.array!.Single(); 477foreach (T v in immutableArray.array!) 507return immutableArray.array!.SingleOrDefault()!; 520foreach (T v in immutableArray.array!) 604foreach (T v in immutableArray.array!) 621if (immutableArray.array!.Length == 0) 623return ImmutableArray<T>.Empty.array!; 626return (T[])immutableArray.array.Clone(); 703foreach (TSource item in immutableArray.array!)
System\Runtime.InteropServices\ImmutableCollectionsMarshal.cs (1)
55return array.array;