11 references to GetValueRefOrNullRef
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
47
/// <inheritdoc cref="SegmentedCollectionsMarshal.
GetValueRefOrNullRef
{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue}, TKey)"/>
Microsoft.CodeAnalysis.UnitTests (10)
Collections\SegmentedCollectionsMarshalTests.cs (10)
192
ref readonly Struct itemRef = ref SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 2);
202
Assert.True(Unsafe.IsNullRef(ref Unsafe.AsRef(in SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3))));
203
Assert.Throws<NullReferenceException>(() => SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3).Value);
228
SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 1).Value = 3;
229
SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 1).Property = 4;
234
ref readonly IntAsObject itemRef = ref SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 2);
249
Assert.True(Unsafe.IsNullRef(ref Unsafe.AsRef(in SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3))));
250
Assert.Throws<NullReferenceException>(() => SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3).Value = 9);
708
ref TValue actualRef = ref Unsafe.AsRef(in SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(immutableDictionary, 0));
774
ref T expectedRef = ref Unsafe.AsRef(in SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(immutableDictionary, 0));