Expand out on to multiple lines

This commit is contained in:
Dean Herbert 2018-08-20 16:06:12 +09:00
parent 65dc9f44e5
commit 295ccabf64
1 changed files with 16 additions and 7 deletions

View File

@ -504,16 +504,25 @@ private void loadComponentSingleFile<T>(T d, Action<T> add)
// schedule is here to ensure that all component loads are done after LoadComplete is run (and thus all dependencies are cached).
// with some better organisation of LoadComplete to do construction and dependency caching in one step, followed by calls to loadComponentSingleFile,
// we could avoid the need for scheduling altogether.
Schedule(() => { asyncLoadStream = asyncLoadStream?.ContinueWith(async t =>
Schedule(() =>
{
try
if (asyncLoadStream != null)
{
await LoadComponentAsync(d, add);
//chain with existing load stream
asyncLoadStream = asyncLoadStream.ContinueWith(async t =>
{
try
{
await LoadComponentAsync(d, add);
}
catch (OperationCanceledException)
{
}
});
}
catch (OperationCanceledException)
{
}
}) ?? LoadComponentAsync(d, add); });
else
asyncLoadStream = LoadComponentAsync(d, add);
});
}
public bool OnPressed(GlobalAction action)