Show / Hide Table of Contents

Class ReferenceCounted

Provides extensions for ReferenceCounted<T> class.

Inheritance
object
ReferenceCounted
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Threading
Assembly: DotNext.dll
Syntax
public static class ReferenceCounted

Methods

View Source

Acquire<T>(ReferenceCounted<T>, out T?)

Acquires the resource.

Declaration
public static ReferenceCounted<T>.Scope Acquire<T>(this ReferenceCounted<T> arc, out T? resource) where T : class, IDisposable
Parameters
Type Name Description
ReferenceCounted<T> arc

The container.

T resource

The acquired resource; or null if resource is reclaimed.

Returns
Type Description
ReferenceCounted<T>.Scope

The scope which controls the lifetime of the reference.

Type Parameters
Name Description
T

The type of the resource.

  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾