Skip to content

Collections

Nill edited this page Sep 10, 2021 · 1 revision

The following collections are provided with Telefrag but are not in any way required to be used for anything in particular.

FragList<T>

Represents an ordered set of items that can be modified while being enumerated without impact (unlike every other useful collection that comes with .NET, save for ConcurrentBag). This is achieved by storing the items both in a typical List, but also in a private linked list that can be safely modified during enumeration because it's walked in a different direction from the direction in which the list expands (new items are added to the end, but the list is enumerated from the last element added back to the first).

FragSet<T>

Same as FragList<T> except that items may only exist in the list once.

FragTable<T, K>

A Dictionary<T, K> that, among other features, will return default rather than throw exceptions when unknown keys are indexed.

Clone this wiki locally