SharedDisposable<T>.Reference Class

Namespace
Kampute.HttpClient.Utilities
Assembly
  • Kampute.HttpClient.dll

Definition

Represents one user's reference to the shared resource.
public sealed class SharedDisposable<T>.Reference : IDisposable
	where T : class, IDisposable
Inheritance
  • object
  • SharedDisposable<T>.Reference
Implements

Type Parameters

T

Properties

Instance

Gets the shared resource.
public T Instance { get; }

Property Value

T
The shared instance of T.

Exceptions

ObjectDisposedException
Thrown if the reference has been disposed.

Owner

Gets the SharedDisposable<T> that the reference belongs to.
public SharedDisposable<T> Owner { get; }

Property Value

SharedDisposable<T>
The SharedDisposable<T> of this reference.

Methods

Dispose()

Releases the reference, and disposes the resource if this was the last active reference.
public void Dispose()

Operators

Implicit(SharedDisposable<T>.Reference)

Returns the shared resource of a reference.
public static implicit operator T(SharedDisposable<T>.Reference reference)

Parameters

reference SharedDisposable<T>.Reference
The reference.

Returns

T
The Instance of reference.