Registry<T>


Declaration

public class Registry<T>

Description

Manages a list of unique items and invokes callbacks when an item is added or removed from the list.

Type Parameters

TThe type of item to register.

Properties

itemsThe items registered in the list (Read only).
registeredA callback invoked when an item is registered.
unregisteredA callback invoked when an item is unregistered.
CountThe amount of items registered in the list (Read only).
Item[int]Returns the item at the specified index.

Constructors

RegistryCreates a new list with a set capacity.

Methods

RegisterRegisters an item in the list.
UnregisterUnregisters an item from the list.
ClearUnregisters all items from the list.
ContainsChecks if a given item is registered in the list.