response collection on ForEach
This commit is contained in:
@@ -2,9 +2,17 @@
|
|||||||
|
|
||||||
public static class IEnumerableExtensions
|
public static class IEnumerableExtensions
|
||||||
{
|
{
|
||||||
public static void ForEach<T>(this IEnumerable<T> @this, Action<T> action)
|
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> @this, Action<T> action)
|
||||||
{
|
{
|
||||||
foreach (var t in @this)
|
foreach (var t in @this)
|
||||||
action(t);
|
action(t);
|
||||||
|
return @this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IQueryable<T> ForEach<T>(this IQueryable<T> @this, Action<T> action)
|
||||||
|
{
|
||||||
|
foreach (var t in @this)
|
||||||
|
action(t);
|
||||||
|
return @this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.1.0</Version>
|
<Version>2.1.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user