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