Resolve CA1062

This commit is contained in:
JustArchi
2021-05-06 23:32:50 +02:00
parent 9a8a61e111
commit 559fdb34c6
5 changed files with 74 additions and 8 deletions

View File

@@ -70,6 +70,10 @@ namespace ArchiSteamFarm.Collections {
public void CopyTo(T[] array, int arrayIndex) => BackingCollection.Keys.CopyTo(array, arrayIndex);
public void ExceptWith(IEnumerable<T> other) {
if (other == null) {
throw new ArgumentNullException(nameof(other));
}
foreach (T item in other) {
Remove(item);
}
@@ -146,6 +150,10 @@ namespace ArchiSteamFarm.Collections {
}
public void UnionWith(IEnumerable<T> other) {
if (other == null) {
throw new ArgumentNullException(nameof(other));
}
foreach (T otherElement in other) {
Add(otherElement);
}