龙腾猫跃 6 месяцев назад
Родитель
Сommit
6e0c722be1
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 1
      Extensions/EnumerableExtensions.cs
  2. 1 0
      MeloongCore.csproj

+ 1 - 1
Extensions/EnumerableExtensions.cs

@@ -166,7 +166,7 @@ public static class EnumerableExtensions {
     /// <summary>
     /// 对集合的每个元素执行指定操作。
     /// </summary>
-    public static IEnumerable<T> ForEach<T>(this IEnumerable<T> source, Action<T> action) {
+    public static IEnumerable<T> ForAll<T>(this IEnumerable<T> source, Action<T> action) {
         foreach (T item in source) action(item);
         return source;
     }

+ 1 - 0
MeloongCore.csproj

@@ -29,6 +29,7 @@
 		<Using Include="System.Linq" />
 		<Using Include="System.Text" />
 		<Using Include="System.IO" />
+		<Using Include="System.Threading" />
 		<Using Include="System.Runtime.CompilerServices" />
 		<Using Include="System.Runtime.InteropServices" />
 		<Using Include="MeloongCore.Extensions" />