Replacing TaskFactory with Task.Factory