How to safely access parameters from Task (Porting from Unity IJob) - C#