public void RunBackup()
{
if (Parallel == false)
{
foreach (var item in backupTasks)
{
item.RunBackup();
}
}
else
{
var tasks = new Task[backupTasks.Count];
for (var i = 0; i < backupTasks.Count; i++)
{
var x = i;
tasks[i] = Task.Factory.StartNew(() => backupTasks[x].RunBackup());
}
Task.WaitAll(tasks);
}
}