1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2025-08-20 13:49:51 +02:00
Files
.config
.run
.workdir
Agent
Common
Docker
Server
Utils
Phantom.Utils.Collections
EnumerableExtensions.cs
Phantom.Utils.Collections.csproj
ReferenceEqualityComparer.cs
RingBuffer.cs
RwLockedDictionary.cs
RwLockedObservableDictionary.cs
Table.cs
Phantom.Utils.Collections.Tests
Phantom.Utils.Cryptography
Phantom.Utils.Events
Phantom.Utils.IO
Phantom.Utils.Rpc
Phantom.Utils.Runtime
Phantom.Utils.Runtime.Tests
.dockerignore
.gitattributes
.gitignore
AddMigration.bat
AddMigration.sh
Directory.Build.props
Directory.Build.targets
Dockerfile
LICENSE
Packages.props
PhantomPanel.sln
README.md
global.json

15 lines
376 B
C#

using System.Diagnostics.CodeAnalysis;
namespace Phantom.Utils.Collections;
public static class EnumerableExtensions {
[SuppressMessage("ReSharper", "LoopCanBeConvertedToQuery")]
public static IEnumerable<TSource> WhereNotNull<TSource>(this IEnumerable<TSource?> items) {
foreach (var item in items) {
if (item is not null) {
yield return item;
}
}
}
}