Table of Contents

Interface IReferencedResource<TKey, TValue>

Namespace
Acuit.Pinpoint.ResourceManagement
Assembly
Acuit.Pinpoint.ResourceManagement.Abstractions.dll

The interface for resources referenced by resource providers derived from ResourceProvider<TKey, TValue, TResource>.

public interface IReferencedResource<TKey, TValue> : IDisposable where TKey : notnull

Type Parameters

TKey

The type of the key used to identify different resources, which must be a non-nullable type.

TValue

The resource value type.

Inherited Members

Properties

Key

Gets the key that identifies this resource.

TKey Key { get; }

Property Value

TKey

Methods

CreateNewReference()

Creates a new reference to this resource.

IResourceReference<TValue> CreateNewReference()

Returns

IResourceReference<TValue>

A new IResourceReference<TValue>, which should be disposed when the reference is no longer needed to remove the reference.

Exceptions

ObjectDisposedException

The object has been disposed.

Events

LastReferenceRemoved

Raised when the last reference to this resource is removed.

event EventHandler<LastReferenceRemovedEventArgs<TKey>>? LastReferenceRemoved

Event Type

EventHandler<LastReferenceRemovedEventArgs<TKey>>