Overview
editThe collections are in the Meziantou.Framework.Collections namespace. They complement the collections of .NET for needs that come up regularly.
| Collection | Use it to | Page |
|---|---|---|
| CircularBuffer<T> | Keep a fixed number of items, optionally overwriting the oldest ones | Queues and buffers |
| DoubleEndedQueue<T> | Add and remove items at both ends, and read them by index | Queues and buffers |
| LimitList<T> | Keep the most recent items, such as a list of recent files | Queues and buffers |
| AppendOnlyCollection<T> | Add items from several threads while others read them | Queues and buffers |
| SortedList<T> | Keep items sorted, duplicates included, with access by index | Sorted collections |
| SkipList<T> | Keep unique items sorted | Sorted collections |
| BTree<T> | Keep unique items sorted in a B-tree | Sorted collections |
| MultiValueDictionary<TKey, TValue> | Associate several values with a key | Dictionaries and tries |
| Trie<TValue> | Find the keys that start with a prefix | Dictionaries and tries |
| PruningRadixTree | Suggest the most frequent completions of a prefix | Dictionaries and tries |
| UnsafeListDictionary<TKey, TValue> | Build a list of key-value pairs without checking for duplicates | Dictionaries and tries |
| ImmutableEquatableArray<T>, ImmutableEquatableSet<T>, ImmutableEquatableDictionary<TKey, TValue> | Compare collections by their content | Equatable collections |
The collections are not thread-safe, except AppendOnlyCollection<T> and the immutable equatable collections. For thread-safe collections, see concurrent collections in Meziantou.Framework.Threading.