public static List<List<object>> Split(List<object> source)
{
return source
.Select((x, i) => new { Index = i, Value = x })
.GroupBy(x => x.Index / 25)
.Select(x => x.Select(v => v.Value).ToList())
.ToList();
}
This will take your list of strings of file names and split them into lists of size 25.
Then I would use the TPL to create an array of tasks based on each sub list of the parent list and run the work from there.
Without more information I cannot write the task portion hope this helps you get started.
No comments:
Post a Comment