4 instantiations of MyDisposable
Microsoft.AspNetCore.Cryptography.Internal.Tests (4)
WeakReferenceHelpersTests.cs (4)
17
MyDisposable newInstance = new
MyDisposable
();
36
MyDisposable newInstance = new
MyDisposable
();
54
MyDisposable instanceThatWillBeCreatedFirst = new
MyDisposable
();
55
MyDisposable instanceThatWillBeCreatedSecond = new
MyDisposable
();
12 references to MyDisposable
Microsoft.AspNetCore.Cryptography.Internal.Tests (12)
WeakReferenceHelpersTests.cs (12)
15
WeakReference<
MyDisposable
> wrOriginal = new WeakReference<
MyDisposable
>(null);
16
WeakReference<
MyDisposable
> wr = wrOriginal;
17
MyDisposable
newInstance = new MyDisposable();
25
Assert.True(wr.TryGetTarget(out
var
target));
35
WeakReference<
MyDisposable
> wr = null;
36
MyDisposable
newInstance = new MyDisposable();
43
Assert.True(wr.TryGetTarget(out
var
target));
53
WeakReference<
MyDisposable
> wr = null;
54
MyDisposable
instanceThatWillBeCreatedFirst = new MyDisposable();
55
MyDisposable
instanceThatWillBeCreatedSecond = new MyDisposable();
67
Assert.True(wr.TryGetTarget(out
var
target));