This commit is contained in:
Łukasz Domeradzki
2024-04-23 19:27:39 +02:00
parent 5bb9494ecc
commit 464ed3b614
3 changed files with 5 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ public sealed class ConcurrentHashSet<T> : IReadOnlySet<T>, ISet<T> where T : no
}
}
[MustDisposeResource]
public IEnumerator<T> GetEnumerator() => BackingCollection.Keys.GetEnumerator();
public void IntersectWith(IEnumerable<T> other) {

View File

@@ -25,6 +25,7 @@ using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using JetBrains.Annotations;
namespace ArchiSteamFarm.Collections;
@@ -51,7 +52,9 @@ internal sealed class FixedSizeConcurrentQueue<T> : IEnumerable<T> where T : not
MaxCount = maxCount;
}
[MustDisposeResource]
public IEnumerator<T> GetEnumerator() => BackingQueue.GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
internal void Enqueue(T obj) {

View File

@@ -124,6 +124,7 @@ public sealed class ObservableConcurrentDictionary<TKey, TValue> : IDictionary<T
((ICollection<KeyValuePair<TKey, TValue>>) BackingDictionary).CopyTo(array, arrayIndex);
}
[MustDisposeResource]
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => BackingDictionary.GetEnumerator();
public bool Remove(KeyValuePair<TKey, TValue> item) {