9 references to GetReference
Microsoft.CodeAnalysis.Test.Utilities (1)
ObjectReference.cs (1)
68
/// Tracks if <see cref="
GetReference
"/> was called, which means it's no longer safe to do lifetime assertions.
Microsoft.CodeAnalysis.UnitTests (8)
InternalUtilities\WeakListTests.cs (8)
85
Assert.Same(b.
GetReference
(), list.GetWeakReference(1).GetTarget());
95
Assert.Same(b.
GetReference
(), nonWeakList[0]);
99
Assert.Same(b.
GetReference
(), list.GetWeakReference(0).GetTarget());
102
GC.KeepAlive(b.
GetReference
());
196
Assert.Same(b.
GetReference
(), list.TestOnly_UnderlyingArray[i].GetTarget());
236
Assert.Same(b.
GetReference
(), list.TestOnly_UnderlyingArray[i].GetTarget());
276
Assert.Same(b.
GetReference
(), list.TestOnly_UnderlyingArray[i].GetTarget());
308
Assert.Same(b.
GetReference
(), list.TestOnly_UnderlyingArray[i].GetTarget());