You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inherits: List<T>
Generic: The generic in Watchable list is the same as in List<T>
What is the point: This list is utility for Registerable system, which makes sure when element is added/removed that method will be called, it allows for the system to register certain events when X is registered and unregister without any issues or memory leaks.
Properties:
public Action<T>? OnAdd { get; set; }
public Action<T>? OnRemove { get; set; }
public Action? OnClear { get; set; }
These properties make actions on certain events of this list. OnAdd when element is added, OnRemove whem element is removed, OnClear when list is cleared.
OnClear makes sure every instance on list calls OnRemove before clearing list.