This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using MemoryPack; | |
| /// <summary> | |
| /// A deterministic dictionary implementation optimized for lookups only. | |
| /// Uses arrays for keys and values with a hash table for O(1) lookups. | |
| /// Maintains MemoryPack serialization compatibility and preserves references. | |
| /// </summary> | |
| [MemoryPackable(GenerateType.CircularReference, SerializeLayout.Explicit)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [MemoryPackable(GenerateType.CircularReference, SerializeLayout.Explicit)] | |
| public partial class DList<T> : IList<T> | |
| { | |
| [MemoryPackInclude][MemoryPackOrder(0)] private int _count; | |
| [MemoryPackInclude][MemoryPackOrder(1)] private T[] _buffer; | |
| /// <summary> | |
| /// Current number of elements in the list | |
| /// </summary> | |
| [MemoryPackIgnore] public int Count => _count; |