SharedDisposable<T>.Reference Class
- Namespace
- Kampute.HttpClient.Utilities
- Assembly
- Kampute.HttpClient.dll
Definition
Represents a reference to the shared disposable 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 instance of the shared disposable resource.
public T Instance { get; }Property Value
- T
- The shared disposable resource instance.
Exceptions
- ObjectDisposedException
- Thrown if the reference has been disposed.
Owner
Gets the SharedDisposable<T> instance that owns this reference.
public SharedDisposable<T> Owner { get; }Property Value
- SharedDisposable<T>
- The owning SharedDisposable<T> instance.
Methods
Dispose()
Decreases the reference count and disposes the resource if it is no longer needed.
public void Dispose()Operators
Implicit(SharedDisposable<T>.Reference)
Allows implicit conversion of the SharedDisposable<T>.Reference to the shared resource type.
public static implicit operator T(SharedDisposable<T>.Reference reference)Parameters
referenceSharedDisposable<T>.Reference- The reference instance.
Returns
- T
- The shared disposable resource instance.
