Select void

This commit is contained in:
DavidOnTop 2025-06-13 13:39:32 +02:00
parent a04646840c
commit 02bfb4265b
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 8D3E9A75E3E13D89
2 changed files with 10 additions and 1 deletions

View file

@ -1,6 +1,6 @@
namespace FuncExt;
public static class Pipe {
public static class Extensions {
public static TRet Run<TRet, T>(this T obj, Func<T, TRet> action) =>
action(obj);
@ -11,4 +11,9 @@ public static class Pipe {
action(obj);
return obj;
}
public static void Select<T>(this IEnumerable<T> source, Action<T> action) {
foreach (var item in source)
action(item);
}
}

View file

@ -7,4 +7,8 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CSharpFunctionalExtensions" Version="3.6.0" />
</ItemGroup>
</Project>