Select void
This commit is contained in:
parent
a04646840c
commit
02bfb4265b
2 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -7,4 +7,8 @@
|
|||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CSharpFunctionalExtensions" Version="3.6.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue