This commit is contained in:
TheXamlGuy
2024-05-24 08:21:50 +01:00
parent 40a150fe80
commit c0c1a82846
103 changed files with 168 additions and 655 deletions
+2
View File
@@ -66,6 +66,7 @@ public class Cache<TKey, TValue>(IComparer<TKey> comparer) :
notnull
{
private readonly List<KeyValuePair<TKey, TValue?>> items = [];
public TValue? this[TKey key]
{
get
@@ -108,6 +109,7 @@ public class Cache<TKey, TValue>(IComparer<TKey> comparer) :
items.Insert(index, new KeyValuePair<TKey, TValue?>(key, value));
}
public void Clear() => items.Clear();
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() =>