Registry Constructor

Constructor in Registry<T>

Declaration

public Registry(int capacity, Action<T> registered = null, Action<T> unregistered = null)

Description

Creates a new list with a set capacity.

Parameters

capacityThe initial capacity of the collection.
registeredThe callback invoked when an item is registered.
unregisteredThe callback invoked when an item is unregistered.

Overload

Declaration

public Registry(T[] items, Action<T> registered = null, Action<T> unregistered = null)

Description

Creates a new list and pre-registers a list of items.

Parameters

itemsThe items to pre-register.
registeredThe callback invoked when an item is registered.
unregisteredThe callback invoked when an item is unregistered.