2 instantiations of ReferenceCountedDisposable
GenerateDocumentationAndConfigFiles (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposable.cs (1)
166
return new
ReferenceCountedDisposable
<T>(target, referenceCount);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
43
disposable = new
ReferenceCountedDisposable
<Entry>(new Entry(this, key, valueCreator(key, arg)));
19 references to ReferenceCountedDisposable
GenerateDocumentationAndConfigFiles (19)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IReferenceCountedDisposable.cs (3)
10
/// A covariant interface form of <see cref="
ReferenceCountedDisposable
{T}"/> that lets you re-cast an <see cref="
ReferenceCountedDisposable
{T}"/>
39
/// <returns>A new <see cref="
ReferenceCountedDisposable
{T}"/> pointing to the same underlying object, if it
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposable.cs (13)
20
/// <para>Each instance of <see cref="
ReferenceCountedDisposable
{T}"/> represents a counted reference (also
32
/// <para>While each instance of <see cref="
ReferenceCountedDisposable
{T}"/> should be explicitly disposed when
41
/// <para>When using <see cref="
ReferenceCountedDisposable
{T}"/>, certain steps must be taken to ensure the
45
/// <para>Use <see cref="
ReferenceCountedDisposable
{T}"/> consistently. In other words, do not mix code using
120
public T Target => _instance ?? throw new ObjectDisposedException(nameof(
ReferenceCountedDisposable
<T>));
129
/// <returns>A new <see cref="
ReferenceCountedDisposable
{T}"/> pointing to the same underlying object, if it
132
public
ReferenceCountedDisposable
<T>? TryAddReference()
142
private static
ReferenceCountedDisposable
<T>? TryAddReferenceImpl(T? target, BoxedReferenceCount referenceCount)
223
/// Represents a weak reference to a <see cref="
ReferenceCountedDisposable
{T}"/> which is capable of
233
public WeakReference(
ReferenceCountedDisposable
<T> reference)
269
/// <para>Unlike <see cref="
ReferenceCountedDisposable
{T}.TryAddReference"/>, this method is capable of
276
/// <returns>A new <see cref="
ReferenceCountedDisposable
{T}"/> pointing to the same underlying object,
279
public
ReferenceCountedDisposable
<T>? TryAddReference()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (3)
18
private readonly Dictionary<TKey,
ReferenceCountedDisposable
<Entry>.WeakReference> _cache = [];
25
ReferenceCountedDisposable
<Entry>? disposable = null;
44
_cache[key] = new
ReferenceCountedDisposable
<Entry>.WeakReference(disposable);