Modules Constructor

Constructor in Modules<T>


Declaration

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

Description

Creates a new module collection with a set capacity.

Parameters

capacityThe initial capacity of the collection.
registeredThe callback invoked when a module is registered.
unregisteredThe callback invoked when a module is unregistered.

Overload

Declaration

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

Description

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

Parameters

itemsThe items to pre-register.
registeredA callback invoked when a module is registered.
unregisteredA callback invoked when a module is unregistered.