13 references to GetValueRefOrNullRef
Microsoft.CodeAnalysis (2)
SourceGeneration\Nodes\StateTableStore.cs (1)
55
SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(_tableBuilder, kvp.Key) = cachedValue;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+PrivateMarshal.cs (1)
18
/// <inheritdoc cref="SegmentedCollectionsMarshal.
GetValueRefOrNullRef
{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue}.Builder, TKey)"/>
Microsoft.CodeAnalysis.UnitTests (11)
Collections\SegmentedCollectionsMarshalTests.cs (11)
275
SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 1).Value = 3;
276
SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 1).Property = 4;
281
ref Struct itemRef = ref SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 2);
303
Assert.True(Unsafe.IsNullRef(ref SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3)));
304
Assert.Throws<NullReferenceException>(() => SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3).Value = 9);
329
SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 1).Value = 3;
330
SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 1).Property = 4;
335
ref IntAsObject itemRef = ref SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 2);
357
Assert.True(Unsafe.IsNullRef(ref SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3)));
358
Assert.Throws<NullReferenceException>(() => SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 3).Value = 9);
371
ref Struct itemRef = ref SegmentedCollectionsMarshal.
GetValueRefOrNullRef
(dict, 1);