Class ReferenceCounted
Provides extensions for ReferenceCounted<T> class.
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.dll
Syntax
public static class ReferenceCounted
Methods
View SourceAcquire<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. |