35 references to SegmentedCollectionsMarshal
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (35)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+PrivateMarshal.cs (3)
14
/// Private helper class for use only by <see cref="
SegmentedCollectionsMarshal
"/>.
18
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.GetValueRefOrNullRef{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue}.Builder, TKey)"/>
20
=> ref
SegmentedCollectionsMarshal
.GetValueRefOrNullRef(dictionary._builder.GetOrCreateMutableDictionary(), key);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (5)
16
/// <see cref="
SegmentedCollectionsMarshal
"/>.
47
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.GetValueRefOrNullRef{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue}, TKey)"/>
49
=> ref
SegmentedCollectionsMarshal
.GetValueRefOrNullRef(dictionary._dictionary, key);
51
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.AsImmutableSegmentedDictionary{TKey, TValue}(SegmentedDictionary{TKey, TValue}?)"/>
55
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.AsSegmentedDictionary{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue})"/>
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (3)
16
/// <see cref="
SegmentedCollectionsMarshal
"/>.
47
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.AsImmutableSegmentedHashSet{T}(SegmentedHashSet{T}?)"/>
51
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.AsSegmentedHashSet{T}(ImmutableSegmentedHashSet{T})"/>
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (3)
16
/// <see cref="
SegmentedCollectionsMarshal
"/>.
47
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.AsImmutableSegmentedList{T}(SegmentedList{T}?)"/>
51
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.AsSegmentedList{T}(ImmutableSegmentedList{T})"/>
src\Dependencies\Collections\Segmented\SegmentedArray.cs (10)
95
if (
SegmentedCollectionsMarshal
.AsSegments(sourceArray) ==
SegmentedCollectionsMarshal
.AsSegments(destinationArray)
450
=> new(
SegmentedCollectionsMarshal
.AsSegments(_first), _firstOffset,
SegmentedCollectionsMarshal
.AsSegments(_second), _secondOffset, _length);
536
=> new(
SegmentedCollectionsMarshal
.AsSegments(_first), _firstOffset,
SegmentedCollectionsMarshal
.AsSegments(_second), _secondOffset, _length);
551
=> new(
SegmentedCollectionsMarshal
.AsSegments(_enumerable._first), _enumerable._firstOffset,
SegmentedCollectionsMarshal
.AsSegments(_enumerable._second), _enumerable._secondOffset, _enumerable._length);
680
=> new(
SegmentedCollectionsMarshal
.AsSegments(_array), _offset, _length);
695
=> new(
SegmentedCollectionsMarshal
.AsSegments(_enumerable._array), _enumerable._offset, _enumerable._length);
src\Dependencies\Collections\Segmented\SegmentedArray`1+PrivateMarshal.cs (2)
12
/// Private helper class for use only by <see cref="
SegmentedCollectionsMarshal
"/>.
16
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.AsSegments{T}(SegmentedArray{T})"/>
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
674
var segments =
SegmentedCollectionsMarshal
.AsSegments(oldArray);
691
return
SegmentedCollectionsMarshal
.AsSegmentedArray(newSize, segments);
src\Dependencies\Collections\Segmented\SegmentedDictionary`2+PrivateMarshal.cs (2)
12
/// Private helper class for use only by <see cref="
SegmentedCollectionsMarshal
"/>.
16
/// <inheritdoc cref="
SegmentedCollectionsMarshal
.GetValueRefOrNullRef{TKey, TValue}(SegmentedDictionary{TKey, TValue}, TKey)"/>
src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (2)
928
var segments =
SegmentedCollectionsMarshal
.AsSegments(oldArray);
945
return
SegmentedCollectionsMarshal
.AsSegmentedArray(newSize, segments);
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
98
if (
SegmentedCollectionsMarshal
.AsSegments(_items) is { Length: 1 } segments)
160
var segments =
SegmentedCollectionsMarshal
.AsSegments(oldArray);
177
return
SegmentedCollectionsMarshal
.AsSegmentedArray(newSize, segments);