mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Misc
This commit is contained in:
@@ -1179,9 +1179,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
// We must call ToList() here as we can't do in-place replace
|
||||
List<Game> gamesToFarm = orderedGamesToFarm.ToList();
|
||||
|
||||
GamesToFarm.Clear();
|
||||
GamesToFarm.AddRange(gamesToFarm);
|
||||
GamesToFarm.ReplaceWith(gamesToFarm);
|
||||
}
|
||||
|
||||
internal sealed class Game : IEquatable<Game> {
|
||||
|
||||
@@ -113,8 +113,9 @@ namespace ArchiSteamFarm.Collections {
|
||||
[SuppressMessage("ReSharper", "AnnotationRedundancyInHierarchy")]
|
||||
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
|
||||
|
||||
internal void AddRange([NotNull] IEnumerable<T> collection) {
|
||||
internal void ReplaceWith([NotNull] IEnumerable<T> collection) {
|
||||
using (Lock.WriterLock()) {
|
||||
BackingCollection.Clear();
|
||||
BackingCollection.AddRange(collection);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user