Example #1
0
 public static Func <CancellationToken, Task> FixMissingFlamesTextures(IEnumerable <string> carIds)
 {
     return(async c => {
         foreach (var car in carIds.Select(x => CarsManager.Instance.GetById(x)).Where(x => x != null))
         {
             await CarFlamesRepair.FixMissingTexturesAsync(car, cancellation : c);
         }
     });
 }
Example #2
0
        public static Func <CancellationToken, Task> FixOldFlames(IEnumerable <string> carIds)
        {
            return(async c => {
                foreach (var car in carIds.Select(x => CarsManager.Instance.GetById(x)).Where(x => x != null))
                {
                    await CarFlamesRepair.UpgradeToSecondVersionAsync(car, cancellation : c);

                    if (c.IsCancellationRequested)
                    {
                        return;
                    }
                }
            });
        }