Necessary for the move to .NET 10 & C# 14. Actual PR to change SS14 to C# 14 will be separate.
}
else
{
- layers = await Task.WhenAll(
+ // Explicitly allocate params array to avoid sandbox violation since C# 14.
+ var tasks = new[]
+ {
LoadParallaxLayers(parallaxPrototype.Layers, loadedLayers, cancel),
- LoadParallaxLayers(parallaxPrototype.LayersLQ, loadedLayers, cancel)
- );
+ LoadParallaxLayers(parallaxPrototype.LayersLQ, loadedLayers, cancel),
+ };
+ layers = await Task.WhenAll(tasks);
}
cancel.ThrowIfCancellationRequested();