13 references to GetValueRefOrNullRef
Microsoft.CodeAnalysis (2)
SourceGeneration\Nodes\StateTableStore.cs (1)
55SegmentedCollectionsMarshal.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)
275SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 1).Value = 3; 276SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 1).Property = 4; 281ref Struct itemRef = ref SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 2); 303Assert.True(Unsafe.IsNullRef(ref SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 3))); 304Assert.Throws<NullReferenceException>(() => SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 3).Value = 9); 329SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 1).Value = 3; 330SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 1).Property = 4; 335ref IntAsObject itemRef = ref SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 2); 357Assert.True(Unsafe.IsNullRef(ref SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 3))); 358Assert.Throws<NullReferenceException>(() => SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 3).Value = 9); 371ref Struct itemRef = ref SegmentedCollectionsMarshal.GetValueRefOrNullRef(dict, 1);