ForEachAsync
/// <summary>
/// 使用异步遍历处理数据
/// </summary>
/// <typeparam name="T">需要遍历的基类</typeparam>
/// <param name="list">集合</param>
/// <param name="func">Lambda表达式</param>
/// <returns></returns>
public static async Task ForEachAsync<T>(this List<T> list, Func<T, Task> func)
{
foreach (T value in list)
{
await func(value);
}
}